thbndi commited on
Commit
dc2990d
·
1 Parent(s): 422f6f1

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. 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
- print(self.config_path)
154
- #shutil.move(file_path, path_bench+'/config')
 
 
155
 
156
  file_path, head = urlretrieve(_DATA_GEN, "data_generation_icu_modify.py")
157
- shutil.move(file_path, path_bench+'/model')
 
 
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)