genhpf 1.0.8__py3-none-any.whl → 1.0.9__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.

genhpf/models/genhpf.py CHANGED
@@ -73,6 +73,7 @@ class GenHPFConfig(BaseConfig):
73
73
  )
74
74
 
75
75
  vocab_size: int = II("dataset.vocab_size")
76
+ debug: bool = II("common.debug")
76
77
 
77
78
 
78
79
  class GenHPF(nn.Module):
@@ -80,6 +81,16 @@ class GenHPF(nn.Module):
80
81
  super().__init__()
81
82
  self.cfg = cfg
82
83
 
84
+ if cfg.debug:
85
+ cfg.encoder_layers = 1
86
+ cfg.encoder_embed_dim = 32
87
+ cfg.encoder_ffn_embed_dim = 128
88
+ cfg.encoder_attention_heads = 2
89
+ cfg.agg_layers = 1
90
+ cfg.agg_embed_dim = 32
91
+ cfg.agg_ffn_embed_dim = 128
92
+ cfg.agg_attention_heads = 2
93
+
83
94
  self.structure = cfg.structure
84
95
  assert self.structure in GENHPF_MODEL_ARCH_CHOICES
85
96
 
genhpf/scripts/train.py CHANGED
@@ -37,7 +37,11 @@ def main(cfg: Config) -> None:
37
37
  logging.config.dictConfig(OmegaConf.to_container(cfg.job_logging_cfg))
38
38
 
39
39
  if cfg.common.debug:
40
- os.environ["OMP_NUM_THREADS"] = "1"
40
+ os.environ["OMP_NUM_THREADS"] = "4"
41
+ os.environ["MKL_NUM_THREADS"] = "4"
42
+ torch.set_num_threads(4)
43
+ torch.set_num_interop_threads(4)
44
+ cfg.optimization.max_epoch = 1
41
45
 
42
46
  assert cfg.dataset.batch_size is not None, "batch_size must be specified"
43
47
  metrics.reset()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: genhpf
3
- Version: 1.0.8
3
+ Version: 1.0.9
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
@@ -23,7 +23,7 @@ genhpf/loggings/meters.py,sha256=ECdJTwFHx_4D22iNbv9VRxlh9iibX8aU9QeHPkqNmXQ,107
23
23
  genhpf/loggings/metrics.py,sha256=3CSBA5C3bd-G-zNer7BeOqSZj-tn6twbpLqAlt-FQ_A,3935
24
24
  genhpf/loggings/progress_bar.py,sha256=9-24WAFDsp6WSS-JncnQtQMwo7DnNEYakAt7a8pkhF0,14140
25
25
  genhpf/models/__init__.py,sha256=EG4YnL8Uiem8iUNm72euHJlim0IZj3inzFVFCFOvPCE,2223
26
- genhpf/models/genhpf.py,sha256=vqyJn9wv3eXLaxi0RTkqwuYTVzH3vTAVR1e5LOGUlhc,9344
26
+ genhpf/models/genhpf.py,sha256=Y9f8H3fgUm1H-QWTnRzcQMu1Pkl6i0ZNNRuSmZZ6Zh0,9712
27
27
  genhpf/models/genhpf_mlm.py,sha256=rExPpm1HDjljAjgFbYx2bgS6VSaIKF6-P7VJcq6YLB0,1882
28
28
  genhpf/models/genhpf_predictor.py,sha256=i-XIh7S3ozpB_r4JZI27sfdnbANyQYpBIOrDDgsiWvc,2163
29
29
  genhpf/models/genhpf_simclr.py,sha256=Iuqx0fy0AQurkTk0e5hEv12eJyeGGGiQJiRKXGgOTnI,1629
@@ -37,7 +37,7 @@ genhpf/modules/layer_norm.py,sha256=-aVKThi1pWvVMbMAzyQG1co6MHPBCUZgxWJKYzIqsPQ,
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
39
  genhpf/scripts/test.py,sha256=DZPiZa-Tm6kKLcK3R1EH82gjq4Hbl098IAY4kA3fQxg,10288
40
- genhpf/scripts/train.py,sha256=-CY_OLRAX3wbthmH3fzkzSuZEEjHGKg0J4jzbbr9HoU,12942
40
+ genhpf/scripts/train.py,sha256=juUgfSVLAXhtBPzIEG09W5lkLlKIv2GHIbMn7IgBJjc,13099
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
43
  genhpf/scripts/preprocess/preprocess_meds.py,sha256=mch8Zl9Ht28fx7nsYfuFb0sc_PN6l1kBQ5iCeEEcrFw,25856
@@ -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.8.dist-info/LICENSE,sha256=VK_rvhY2Xi_DAIZHtauni5O9-1_do5SNWjrskv4amg8,1065
63
- genhpf-1.0.8.dist-info/METADATA,sha256=k5-iE6UYfJ0rx_NJTuHVM4uw5IdhuJvztoORAtpc_6Q,10589
64
- genhpf-1.0.8.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
65
- genhpf-1.0.8.dist-info/entry_points.txt,sha256=Wp94VV2w9KasBDLaluLM5EnjLgjNOAQVu44wKRDAwmQ,288
66
- genhpf-1.0.8.dist-info/top_level.txt,sha256=lk846Vmnvydb6UZn8xmowj60nkrZYexNOGGnPM-IbhA,7
67
- genhpf-1.0.8.dist-info/RECORD,,
62
+ genhpf-1.0.9.dist-info/LICENSE,sha256=VK_rvhY2Xi_DAIZHtauni5O9-1_do5SNWjrskv4amg8,1065
63
+ genhpf-1.0.9.dist-info/METADATA,sha256=0YRTk9CjFLdEVayQOm7mvdDUi1oBVTLv-v-GANBbuaY,10589
64
+ genhpf-1.0.9.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
65
+ genhpf-1.0.9.dist-info/entry_points.txt,sha256=Wp94VV2w9KasBDLaluLM5EnjLgjNOAQVu44wKRDAwmQ,288
66
+ genhpf-1.0.9.dist-info/top_level.txt,sha256=lk846Vmnvydb6UZn8xmowj60nkrZYexNOGGnPM-IbhA,7
67
+ genhpf-1.0.9.dist-info/RECORD,,
File without changes