Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +7 -3
Mimic4Dataset.py
CHANGED
|
@@ -150,11 +150,15 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
| 150 |
if self.config_path[0:4] == 'http':
|
| 151 |
file_path, head = urlretrieve(self.config_path)
|
| 152 |
else :
|
| 153 |
-
|
| 154 |
-
|
|
|
|
|
|
|
| 155 |
|
| 156 |
file_path, head = urlretrieve(_DATA_GEN, "data_generation_icu_modify.py")
|
| 157 |
-
|
|
|
|
|
|
|
| 158 |
|
| 159 |
data_dir = path_bench + "/data/dataDic"
|
| 160 |
task_cohort(self.name,self.mimic_path, path_bench, self.config_path)
|
|
|
|
| 150 |
if self.config_path[0:4] == 'http':
|
| 151 |
file_path, head = urlretrieve(self.config_path)
|
| 152 |
else :
|
| 153 |
+
file_path = self.config_path
|
| 154 |
+
|
| 155 |
+
if not os.path.exists(path_bench+'/config/'+self.config_path.split('/')[-1]):
|
| 156 |
+
shutil.move(file_path, path_bench+'/config')
|
| 157 |
|
| 158 |
file_path, head = urlretrieve(_DATA_GEN, "data_generation_icu_modify.py")
|
| 159 |
+
|
| 160 |
+
if not os.path.exists(path_bench+'/model/data_generation_icu_modify.py'):
|
| 161 |
+
shutil.move(file_path, path_bench+'/model')
|
| 162 |
|
| 163 |
data_dir = path_bench + "/data/dataDic"
|
| 164 |
task_cohort(self.name,self.mimic_path, path_bench, self.config_path)
|