guts-base 1.0.4__py3-none-any.whl → 1.0.5__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.
Potentially problematic release.
This version of guts-base might be problematic. Click here for more details.
- guts_base/__init__.py +1 -1
- guts_base/sim/base.py +9 -11
- guts_base/sim/ecx.py +0 -5
- guts_base/sim/report.py +0 -6
- {guts_base-1.0.4.dist-info → guts_base-1.0.5.dist-info}/METADATA +1 -1
- {guts_base-1.0.4.dist-info → guts_base-1.0.5.dist-info}/RECORD +10 -10
- {guts_base-1.0.4.dist-info → guts_base-1.0.5.dist-info}/WHEEL +0 -0
- {guts_base-1.0.4.dist-info → guts_base-1.0.5.dist-info}/entry_points.txt +0 -0
- {guts_base-1.0.4.dist-info → guts_base-1.0.5.dist-info}/licenses/LICENSE +0 -0
- {guts_base-1.0.4.dist-info → guts_base-1.0.5.dist-info}/top_level.txt +0 -0
guts_base/__init__.py
CHANGED
guts_base/sim/base.py
CHANGED
|
@@ -812,17 +812,15 @@ class GutsBase(SimulationBase):
|
|
|
812
812
|
still be some problems down the line.
|
|
813
813
|
"""
|
|
814
814
|
with warnings.catch_warnings(action="ignore"):
|
|
815
|
-
#
|
|
816
|
-
#
|
|
817
|
-
#
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
# no longer necessary.
|
|
825
|
-
sim_copy.tempdir = tempdir
|
|
815
|
+
# create the tempdir in the output path, because on the remote cluster
|
|
816
|
+
# the default temporary directory may not have enough space. Using the output
|
|
817
|
+
# path here resolves any path issues.
|
|
818
|
+
tmp_basedir = os.path.join(self.output_path, "tmp")
|
|
819
|
+
os.makedirs(tmp_basedir, exist_ok=True)
|
|
820
|
+
with tempfile.TemporaryDirectory(dir=tmp_basedir) as name:
|
|
821
|
+
self.export(directory=name)
|
|
822
|
+
print(f"Exported files ({name}):", os.listdir(name))
|
|
823
|
+
sim_copy = type(self).from_directory(name)
|
|
826
824
|
|
|
827
825
|
return sim_copy
|
|
828
826
|
|
guts_base/sim/ecx.py
CHANGED
|
@@ -112,11 +112,6 @@ class ECxEstimator:
|
|
|
112
112
|
|
|
113
113
|
self.condition_posterior_parameters(conditions=conditions_posterior)
|
|
114
114
|
|
|
115
|
-
def __del__(self):
|
|
116
|
-
if hasattr(self.sim, "tempdir"):
|
|
117
|
-
self.sim.tempdir.cleanup()
|
|
118
|
-
|
|
119
|
-
|
|
120
115
|
def _assert_posterior(self):
|
|
121
116
|
try:
|
|
122
117
|
p = self.sim.inferer.idata.posterior
|
guts_base/sim/report.py
CHANGED
|
@@ -105,12 +105,6 @@ class GutsReport(Report):
|
|
|
105
105
|
|
|
106
106
|
ecx.append(ecx_estimator.results.copy(deep=True))
|
|
107
107
|
|
|
108
|
-
# remove ecx_estimator to not blow up temp files.
|
|
109
|
-
# This triggers the __del__ method of ECxEstimator,
|
|
110
|
-
# which cleans up a temporary directory if it was
|
|
111
|
-
# created during init
|
|
112
|
-
del ecx_estimator
|
|
113
|
-
|
|
114
108
|
results = pd.DataFrame(ecx)
|
|
115
109
|
estimates[results.columns] = results
|
|
116
110
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
guts_base/__init__.py,sha256=
|
|
1
|
+
guts_base/__init__.py,sha256=h51lqbwq425YF40jI1Cw6dT0CXtcO_WSrvxbmb1KA3U,227
|
|
2
2
|
guts_base/mod.py,sha256=AzOCg1A8FP5EtVfp-66HT7G7h_wnHkenieaxTc9qCyk,5796
|
|
3
3
|
guts_base/plot.py,sha256=Sr_d0sXHNajPLPelcGl72yCOEEqB7NGNWhViKYAiTng,6692
|
|
4
4
|
guts_base/prob.py,sha256=ITwo5dAGMHr5xTldilHMbKU6AFsWo4_ZwbfaXh97Gew,5443
|
|
@@ -11,15 +11,15 @@ guts_base/data/survival.py,sha256=U-Ehloo8vnD81VeIglXLEUHX9lt7SjtEs2YEB0D9FHE,50
|
|
|
11
11
|
guts_base/data/time_of_death.py,sha256=hwngUwfRP3u8WmD3dHyXrphuu5d8ZJTKyBovGRwAHNQ,21014
|
|
12
12
|
guts_base/data/utils.py,sha256=u3gGDJK15MfRUP4iIxsS-I1oqxD2qH_ugsT7o_Eac18,236
|
|
13
13
|
guts_base/sim/__init__.py,sha256=sbHmT1p2saN0MJ-iYnCDOHjkHtTcKgm7X-dHX5o0tYA,435
|
|
14
|
-
guts_base/sim/base.py,sha256=
|
|
14
|
+
guts_base/sim/base.py,sha256=mYHRDS6KKOrTzgsTAy5IKcVn6zIhqJH9EY9dFrsY0So,37739
|
|
15
15
|
guts_base/sim/constructors.py,sha256=Kz9FHIH3EHsSIKd9sQgHa3eveniFifFlk1Hf-QR69Pg,875
|
|
16
|
-
guts_base/sim/ecx.py,sha256=
|
|
16
|
+
guts_base/sim/ecx.py,sha256=PeX8UVF1HMMNHaIU-jL6dml4JGezhWwiGSqPFJbOFM4,20808
|
|
17
17
|
guts_base/sim/mempy.py,sha256=IHd87UrmdXpC7y7q0IjYQJH075frjbp2a-dMVBeqZ0U,10164
|
|
18
|
-
guts_base/sim/report.py,sha256=
|
|
18
|
+
guts_base/sim/report.py,sha256=Omm7czcnl3K-eWva_080uQi5RWzUrDxi7gYPjkNO_QM,6787
|
|
19
19
|
guts_base/sim/utils.py,sha256=Qj_FPH6kywVxOwgCerS7w5CyuYR9HKmvBWFpmxwDFgk,256
|
|
20
|
-
guts_base-1.0.
|
|
21
|
-
guts_base-1.0.
|
|
22
|
-
guts_base-1.0.
|
|
23
|
-
guts_base-1.0.
|
|
24
|
-
guts_base-1.0.
|
|
25
|
-
guts_base-1.0.
|
|
20
|
+
guts_base-1.0.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
21
|
+
guts_base-1.0.5.dist-info/METADATA,sha256=TKQepymlj9INzwGyhPh3jZ37Zcm7BpULGR9L7FvhNR8,45426
|
|
22
|
+
guts_base-1.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
23
|
+
guts_base-1.0.5.dist-info/entry_points.txt,sha256=icsHzG2jQ90ZS7XvLsI5Qj0-qGuPv2T0RBVN5daGCPU,183
|
|
24
|
+
guts_base-1.0.5.dist-info/top_level.txt,sha256=PxhBgUd4r39W_VI4FyJjARwKbV5_glgCVnd6v_zAGdE,10
|
|
25
|
+
guts_base-1.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|