genhpf 1.0.4__py3-none-any.whl → 1.0.6__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 genhpf might be problematic. Click here for more details.

@@ -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)
genhpf/scripts/test.py CHANGED
@@ -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"))
genhpf/scripts/train.py CHANGED
@@ -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.4
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
@@ -36,11 +36,11 @@ genhpf/modules/identity_layer.py,sha256=uGRqfRBNhc-ha5wNrqawh5E1pw5Lm9GDGi1stju-
36
36
  genhpf/modules/layer_norm.py,sha256=-aVKThi1pWvVMbMAzyQG1co6MHPBCUZgxWJKYzIqsPQ,902
37
37
  genhpf/modules/positional_encoding.py,sha256=Rf_qHdQArljEggRO4EHufc_JHq9-i44Oog1w9Bh51DQ,754
38
38
  genhpf/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- genhpf/scripts/test.py,sha256=wWi7OLqxsW9blj21m3RTirvziQ5UpkjkngOkgkE3Vb4,10149
40
- genhpf/scripts/train.py,sha256=5f5PYOkiW7BahbFArvdOguAzUdDnY4Urw7Nx3aJ4kjs,12488
39
+ genhpf/scripts/test.py,sha256=DZPiZa-Tm6kKLcK3R1EH82gjq4Hbl098IAY4kA3fQxg,10288
40
+ genhpf/scripts/train.py,sha256=V4abCZ0r6qWxeJZdXyk4uXSVFXscqH_dhzk7CZuWrBA,12872
41
41
  genhpf/scripts/preprocess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  genhpf/scripts/preprocess/manifest.py,sha256=ZIK16e4vs_cS2K_tM1GaT38hc1nBHk6JB9Uga6OjgU4,2711
43
- genhpf/scripts/preprocess/preprocess_meds.py,sha256=x5R4KDzzB-21IUHjfkyo4-Be1t9U4oaurjm5VhxZ5Rw,25050
43
+ genhpf/scripts/preprocess/preprocess_meds.py,sha256=4GIK-_sQwB5A11FSbr_VnABY2MHxxNbFVmzSo71KpgQ,25074
44
44
  genhpf/scripts/preprocess/genhpf/README.md,sha256=qtpM_ABJk5yI8xbsUj1sZ71yX5bybx9ZvAymo0Lh5Vc,2877
45
45
  genhpf/scripts/preprocess/genhpf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  genhpf/scripts/preprocess/genhpf/main.py,sha256=EF3sce0ltowMHIGK7zLEQEOnzOWQ_WJxoBowknHV3mQ,6161
@@ -59,9 +59,9 @@ genhpf/utils/distributed_utils.py,sha256=000xKlw8SLoSH16o6n2bB3eueGR0aVD_DufPYES
59
59
  genhpf/utils/file_io.py,sha256=hnZXdMtAibfFDoIfn-SDusl-v7ZImeUEh0eD2MIxbG4,4919
60
60
  genhpf/utils/pdb.py,sha256=400rk1pVfOpVpzKIFHnTRlZ2VCtBqRh9G-pRRwu2Oqo,930
61
61
  genhpf/utils/utils.py,sha256=BoC_7Gz8uCHbUBCpcXGBMD-5irApi_6xM7nU-2ac4aA,6176
62
- genhpf-1.0.4.dist-info/LICENSE,sha256=VK_rvhY2Xi_DAIZHtauni5O9-1_do5SNWjrskv4amg8,1065
63
- genhpf-1.0.4.dist-info/METADATA,sha256=Mgs4WysCKfBf4E2Jik2BgMdZPM8w1-rL5NoqgeqM5Zo,10589
64
- genhpf-1.0.4.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
65
- genhpf-1.0.4.dist-info/entry_points.txt,sha256=Wp94VV2w9KasBDLaluLM5EnjLgjNOAQVu44wKRDAwmQ,288
66
- genhpf-1.0.4.dist-info/top_level.txt,sha256=lk846Vmnvydb6UZn8xmowj60nkrZYexNOGGnPM-IbhA,7
67
- genhpf-1.0.4.dist-info/RECORD,,
62
+ genhpf-1.0.6.dist-info/LICENSE,sha256=VK_rvhY2Xi_DAIZHtauni5O9-1_do5SNWjrskv4amg8,1065
63
+ genhpf-1.0.6.dist-info/METADATA,sha256=jNN97lqcfOLt3fbpmwd643IcTT-PlVof7IlkCur9zQs,10589
64
+ genhpf-1.0.6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
65
+ genhpf-1.0.6.dist-info/entry_points.txt,sha256=Wp94VV2w9KasBDLaluLM5EnjLgjNOAQVu44wKRDAwmQ,288
66
+ genhpf-1.0.6.dist-info/top_level.txt,sha256=lk846Vmnvydb6UZn8xmowj60nkrZYexNOGGnPM-IbhA,7
67
+ genhpf-1.0.6.dist-info/RECORD,,
File without changes