risk-network 0.0.3b2__py3-none-any.whl → 0.0.3b4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- risk/__init__.py +1 -1
- risk/log/params.py +5 -8
- risk/stats/stats.py +3 -1
- {risk_network-0.0.3b2.dist-info → risk_network-0.0.3b4.dist-info}/METADATA +1 -1
- {risk_network-0.0.3b2.dist-info → risk_network-0.0.3b4.dist-info}/RECORD +8 -8
- {risk_network-0.0.3b2.dist-info → risk_network-0.0.3b4.dist-info}/LICENSE +0 -0
- {risk_network-0.0.3b2.dist-info → risk_network-0.0.3b4.dist-info}/WHEEL +0 -0
- {risk_network-0.0.3b2.dist-info → risk_network-0.0.3b4.dist-info}/top_level.txt +0 -0
risk/__init__.py
CHANGED
risk/log/params.py
CHANGED
@@ -147,14 +147,11 @@ class Params:
|
|
147
147
|
params = self.load()
|
148
148
|
# Open the file in write mode
|
149
149
|
with open(filepath, "w") as txt_file:
|
150
|
-
for key,
|
151
|
-
# Write the key
|
152
|
-
txt_file.write(f"{key}
|
153
|
-
|
154
|
-
|
155
|
-
txt_file.write(f" {nested_key}: {nested_value}\n")
|
156
|
-
# Add a blank line between different keys
|
157
|
-
txt_file.write("\n")
|
150
|
+
for key, value in params.items():
|
151
|
+
# Write the key and its corresponding value
|
152
|
+
txt_file.write(f"{key}: {value}\n")
|
153
|
+
# Add a blank line after each entry
|
154
|
+
txt_file.write("\n")
|
158
155
|
|
159
156
|
def load(self) -> Dict[str, Any]:
|
160
157
|
"""Load and process various parameters, converting any np.ndarray values to lists.
|
risk/stats/stats.py
CHANGED
@@ -153,9 +153,11 @@ def _run_permutation_test(
|
|
153
153
|
results = pool.starmap_async(_permutation_process_subset, params_list)
|
154
154
|
|
155
155
|
# Update progress bar based on progress_counter
|
156
|
+
# NOTE: Waiting for results to be ready while updating progress bar gives a big improvement
|
157
|
+
# in performance, especially for large number of permutations and workers
|
156
158
|
while not results.ready():
|
157
159
|
progress.update(progress_counter.value - progress.n)
|
158
|
-
results.wait(
|
160
|
+
results.wait(1) # Wait for 1 second
|
159
161
|
|
160
162
|
# Ensure progress bar reaches 100%
|
161
163
|
progress.update(total_progress - progress.n)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
risk/__init__.py,sha256=
|
1
|
+
risk/__init__.py,sha256=7JTz-sr7kIgP1-2x6p8-HirKCr90zZTsy-gIbKdeYMw,122
|
2
2
|
risk/constants.py,sha256=AICk3x5qRQhls_ijTb4VdbdxU6mZ1aLGbAjLEdBwfJI,550
|
3
3
|
risk/risk.py,sha256=cWpYogZ-vma4ZZjewVNRMzb2TqHv8YABuzP2brXpOqo,16399
|
4
4
|
risk/annotations/__init__.py,sha256=vUpVvMRE5if01Ic8QY6M2Ae3EFGJHdugEe9PdEkAW4Y,138
|
@@ -6,7 +6,7 @@ risk/annotations/annotations.py,sha256=gZ9gihK_eTWaX3eByh08xr97FX4-XKe6MBwCCjasE
|
|
6
6
|
risk/annotations/io.py,sha256=ozi7aFn3_geB6G0kt7Ya1qVhNOqP6rB0YISjriSZyNw,7989
|
7
7
|
risk/log/__init__.py,sha256=xuLImfxFlKpnVhzi_gDYlr2_c9cLkrw2c_3iEsXb1as,107
|
8
8
|
risk/log/console.py,sha256=im9DRExwf6wHlcn9fewoDcKIpo3vPcorZIaNAl-0csY,355
|
9
|
-
risk/log/params.py,sha256=
|
9
|
+
risk/log/params.py,sha256=Tbb-sovFTptGBqPDKafUA8KOpby4zFObutAT_Iti1hE,6302
|
10
10
|
risk/neighborhoods/__init__.py,sha256=tKKEg4lsbqFukpgYlUGxU_v_9FOqK7V0uvM9T2QzoL0,206
|
11
11
|
risk/neighborhoods/community.py,sha256=eL2IGT-8sbiJIyfyb_FGngev7pEMxw7tZb8YzbzOYw8,6512
|
12
12
|
risk/neighborhoods/domains.py,sha256=HwuChmZH0RGD9eQOvk2-ezQDJRUHHn93vhVgHb-kX6I,10192
|
@@ -18,9 +18,9 @@ risk/network/io.py,sha256=KmdrsDZe-ZT4O59NYZM_nQd8Ew9qpbzQcqWS_PaE7eA,12559
|
|
18
18
|
risk/network/plot.py,sha256=fy21X677xqJPFkn564Jegxy05C9x0pJXovd5fm3NZ4Q,34554
|
19
19
|
risk/stats/__init__.py,sha256=4s9gdJo5B1G_cQc0iMoeIBt5OrQNXkdtNXkAMFQkLxc,103
|
20
20
|
risk/stats/permutation.py,sha256=xgaZbaxo57t_FzPlpcb2nsq8oCzc_wj-zAm-xj3P2dA,3404
|
21
|
-
risk/stats/stats.py,sha256=
|
22
|
-
risk_network-0.0.
|
23
|
-
risk_network-0.0.
|
24
|
-
risk_network-0.0.
|
25
|
-
risk_network-0.0.
|
26
|
-
risk_network-0.0.
|
21
|
+
risk/stats/stats.py,sha256=Yu9LMSUtCRkg-h0ErJurb-rkajHgTvdzBcymHldJs5k,16007
|
22
|
+
risk_network-0.0.3b4.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
23
|
+
risk_network-0.0.3b4.dist-info/METADATA,sha256=_xhdIlmS0XAYJWRI1yjQppksLevhfTX_wFjKzX5hf9Q,43256
|
24
|
+
risk_network-0.0.3b4.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
|
25
|
+
risk_network-0.0.3b4.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
|
26
|
+
risk_network-0.0.3b4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|