thbndi commited on
Commit
1c4c7b5
·
1 Parent(s): 3e15616

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +3 -3
Mimic4Dataset.py CHANGED
@@ -221,14 +221,14 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
221
  if not os.path.exists('cohort.py'):
222
  shutil.move(file_path, './')
223
 
224
- data_dir = "./data/dict/"+self.config.name+"/dataDic"
225
  sys.path.append(path_bench)
226
  config = self.config_path.split('/')[-1]
227
 
228
  script = 'python cohort.py '+ self.config.name.replace(" ","_") +" "+ self.mimic_path+ " "+path_bench+ " "+config
229
  print(script)
230
- #if not os.path.exists(data_dir) :
231
- os.system(script)
232
  return [
233
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
234
  ]
 
221
  if not os.path.exists('cohort.py'):
222
  shutil.move(file_path, './')
223
 
224
+ data_dir = "./data/dict/"+self.config.name.replace(" ","_")+"/dataDic"
225
  sys.path.append(path_bench)
226
  config = self.config_path.split('/')[-1]
227
 
228
  script = 'python cohort.py '+ self.config.name.replace(" ","_") +" "+ self.mimic_path+ " "+path_bench+ " "+config
229
  print(script)
230
+ if not os.path.exists(data_dir) :
231
+ os.system(script)
232
  return [
233
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
234
  ]