genhpf 1.0.4__tar.gz → 1.0.6__tar.gz
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 genhpf might be problematic. Click here for more details.
- {genhpf-1.0.4/src/genhpf.egg-info → genhpf-1.0.6}/PKG-INFO +1 -1
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/preprocess_meds.py +2 -2
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/test.py +3 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/train.py +8 -0
- {genhpf-1.0.4 → genhpf-1.0.6/src/genhpf.egg-info}/PKG-INFO +1 -1
- {genhpf-1.0.4 → genhpf-1.0.6}/.gitignore +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/.pre-commit-config.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/LICENSE +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/README.md +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/pretrain/mlm/genhpf/flattened_pt.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/pretrain/simclr/genhpf/genhpf_hierarchical_pt.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/pretrain/wav2vec2/genhpf/hierarchical_pt.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/test/genhpf/genhpf_flattened.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/test/genhpf/genhpf_hierarchical.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/test/genhpf/meds_hierarchical.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/train/genhpf/genhpf_flattened_ft.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/train/genhpf/genhpf_hierarchical_ft.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/train/genhpf/genhpf_hierarchical_scr.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/examples/train/genhpf/meds_hierarchical_scr.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/pyproject.toml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/setup.cfg +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/configs/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/configs/config.yaml +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/configs/configs.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/configs/constants.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/configs/initialize.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/configs/utils.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/binary_cross_entropy.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/binary_cross_entropy_with_logits.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/criterion.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/cross_entropy.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/multi_task_criterion.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/simclr_criterion.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/criterions/wav2vec2_criterion.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/datasets/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/datasets/dataset.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/datasets/genhpf_dataset.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/datasets/meds_dataset.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/loggings/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/loggings/meters.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/loggings/metrics.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/loggings/progress_bar.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/models/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/models/genhpf.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/models/genhpf_mlm.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/models/genhpf_predictor.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/models/genhpf_simclr.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/models/genhpf_wav2vec2.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/gather_layer.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/grad_multiply.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/gumbel_vector_quantizer.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/identity_layer.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/layer_norm.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/modules/positional_encoding.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/README.md +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/ehrs/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/ehrs/ehr.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/ehrs/eicu.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/ehrs/mimiciii.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/ehrs/mimiciv.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/main.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/manifest.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/sample_dataset.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/utils/__init__.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/genhpf/utils/utils.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/scripts/preprocess/manifest.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/trainer.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/utils/checkpoint_utils.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/utils/data_utils.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/utils/distributed_utils.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/utils/file_io.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/utils/pdb.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf/utils/utils.py +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf.egg-info/SOURCES.txt +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf.egg-info/dependency_links.txt +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf.egg-info/entry_points.txt +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf.egg-info/requires.txt +0 -0
- {genhpf-1.0.4 → genhpf-1.0.6}/src/genhpf.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: genhpf
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: GenHPF: General Healthcare Predictive Framework with Multi-task Multi-source Learning
|
|
5
5
|
Author-email: Jungwoo Oh <ojw0123@kaist.ac.kr>, Kyunghoon Hur <pacesun@kaist.ac.kr>
|
|
6
6
|
License: MIT license
|
|
@@ -148,11 +148,11 @@ def main():
|
|
|
148
148
|
data_paths = [root_path]
|
|
149
149
|
|
|
150
150
|
if not output_dir.exists():
|
|
151
|
-
output_dir.mkdir()
|
|
151
|
+
output_dir.mkdir(parents=True)
|
|
152
152
|
else:
|
|
153
153
|
if args.rebase:
|
|
154
154
|
shutil.rmtree(output_dir)
|
|
155
|
-
output_dir.mkdir()
|
|
155
|
+
output_dir.mkdir(parents=True)
|
|
156
156
|
elif output_dir.exists():
|
|
157
157
|
if args.skip_if_exists:
|
|
158
158
|
ls = glob.glob(str(output_dir / "**/*"), recursive=True)
|
|
@@ -208,6 +208,9 @@ def main(cfg: Config) -> None:
|
|
|
208
208
|
meds_pred_output = meds_pred_output.with_columns(
|
|
209
209
|
pl.col("subject_id").map_elements(lambda x: x.split("_")[0], return_dtype=pl.String).cast(int)
|
|
210
210
|
)
|
|
211
|
+
meds_pred_output = (
|
|
212
|
+
meds_pred_output.with_columns(pl.col("predicted_boolean_value").cast(bool))
|
|
213
|
+
)
|
|
211
214
|
if not os.path.exists(cfg.meds.output_dir):
|
|
212
215
|
os.makedirs(cfg.meds.output_dir)
|
|
213
216
|
meds_pred_output.write_parquet(os.path.join(cfg.meds.output_dir, f"{subset}.parquet"))
|
|
@@ -281,6 +281,14 @@ def validate(
|
|
|
281
281
|
|
|
282
282
|
progress.print(stats, tag=subset, step=trainer.get_num_updates())
|
|
283
283
|
|
|
284
|
+
if np.isnan(stats[cfg.checkpoint.best_checkpoint_metric]):
|
|
285
|
+
logger.info(
|
|
286
|
+
f"validation value for {cfg.checkpoint.best_checkpoint_metric} is NaN. "
|
|
287
|
+
"Changed the best checkpoint metric to loss."
|
|
288
|
+
)
|
|
289
|
+
cfg.checkpoint.best_checkpoint_metric = "loss"
|
|
290
|
+
cfg.checkpoint.maximize_best_checkpoint_metric = False
|
|
291
|
+
|
|
284
292
|
valid_losses.append(stats[cfg.checkpoint.best_checkpoint_metric])
|
|
285
293
|
|
|
286
294
|
return valid_losses
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: genhpf
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: GenHPF: General Healthcare Predictive Framework with Multi-task Multi-source Learning
|
|
5
5
|
Author-email: Jungwoo Oh <ojw0123@kaist.ac.kr>, Kyunghoon Hur <pacesun@kaist.ac.kr>
|
|
6
6
|
License: MIT license
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|