Update cohort.py
Browse files
cohort.py
CHANGED
@@ -7,26 +7,29 @@ import shutil
|
|
7 |
import time
|
8 |
import yaml
|
9 |
|
10 |
-
|
11 |
-
def task_cohort(task,mimic_path,path_benchmark, config):
|
12 |
-
sys.path.append('/preprocessing/day_intervals_preproc')
|
13 |
-
sys.path.append('/utils')
|
14 |
-
sys.path.append('/preprocessing/hosp_module_preproc')
|
15 |
-
sys.path.append('/model')
|
16 |
-
import day_intervals_cohort_v2
|
17 |
-
import day_intervals_cohort
|
18 |
-
import feature_selection_icu
|
19 |
-
import data_generation_icu_modify
|
20 |
root_dir = path_benchmark
|
21 |
-
|
|
|
22 |
config = yaml.safe_load(f)
|
23 |
version_path = mimic_path
|
24 |
version = version_path.split('/')[-1][0]
|
25 |
print(version)
|
26 |
|
27 |
if __name__ == '__main__':
|
|
|
|
|
28 |
task = sys.argv[1]
|
29 |
mimic_path = sys.argv[2]
|
30 |
path_benchmark = sys.argv[3]
|
31 |
config = sys.argv[4]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
task_cohort(task, mimic_path, path_benchmark, config)
|
|
|
7 |
import time
|
8 |
import yaml
|
9 |
|
10 |
+
def task_cohort(task,mimic_path,path_benchmark, config_path):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
root_dir = path_benchmark
|
12 |
+
config_path=path_benchmark+'/config/'+config_path
|
13 |
+
with open(config_path) as f:
|
14 |
config = yaml.safe_load(f)
|
15 |
version_path = mimic_path
|
16 |
version = version_path.split('/')[-1][0]
|
17 |
print(version)
|
18 |
|
19 |
if __name__ == '__main__':
|
20 |
+
|
21 |
+
|
22 |
task = sys.argv[1]
|
23 |
mimic_path = sys.argv[2]
|
24 |
path_benchmark = sys.argv[3]
|
25 |
config = sys.argv[4]
|
26 |
+
sys.path.append(path_benchmark+'/preprocessing/day_intervals_preproc')
|
27 |
+
sys.path.append(path_benchmark+'/utils')
|
28 |
+
sys.path.append(path_benchmark+'/preprocessing/hosp_module_preproc')
|
29 |
+
sys.path.append(path_benchmark+'/model')
|
30 |
+
import day_intervals_cohort_v2
|
31 |
+
import day_intervals_cohort
|
32 |
+
import feature_selection_icu
|
33 |
+
import data_generation_icu_modify
|
34 |
+
|
35 |
task_cohort(task, mimic_path, path_benchmark, config)
|