thbndi commited on
Commit
788d24e
·
1 Parent(s): fa22320

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +8 -4
Mimic4Dataset.py CHANGED
@@ -140,13 +140,15 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
140
  version = self.mimic_path.split('/')[-1]
141
  m = self.mimic_path.split('/')[-2]
142
  s='/'+m+'/'+version
 
143
  dir = self.mimic_path.replace(s,'')
144
  print(dir)
145
  if dir[-1]!='/':
146
  dir=dir+'/'
147
  elif dir=='':
148
  dir="./"
149
- parent_dir = os.path.dirname(os.path.dirname(self.mimic_path))
 
150
  os.chdir(parent_dir)
151
  print('0 : '+os.getcwd())
152
 
@@ -163,10 +165,12 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
163
  print('1 bis : '+os.getcwd())
164
  subprocess.run(["git", "clone", repo_url, path_bench])
165
  os.chdir(path_bench)
166
- print('2 : '+os.getcwd())
167
- os.makedirs(m)
168
- shutil.move(self.mimic_path, './'+m)
 
169
  print('0 : '+os.getcwd())
 
170
 
171
  #download config file if not custom
172
  if self.config_path[0:4] == 'http':
 
140
  version = self.mimic_path.split('/')[-1]
141
  m = self.mimic_path.split('/')[-2]
142
  s='/'+m+'/'+version
143
+
144
  dir = self.mimic_path.replace(s,'')
145
  print(dir)
146
  if dir[-1]!='/':
147
  dir=dir+'/'
148
  elif dir=='':
149
  dir="./"
150
+
151
+ parent_dir = os.path.dirname(self.mimic_path)
152
  os.chdir(parent_dir)
153
  print('0 : '+os.getcwd())
154
 
 
165
  print('1 bis : '+os.getcwd())
166
  subprocess.run(["git", "clone", repo_url, path_bench])
167
  os.chdir(path_bench)
168
+ os.makedirs('mimic-iv')
169
+ shutil.move(self.mimic_path,path_bench+'/mimic-iv')
170
+
171
+ #print('2 : '+os.getcwd())
172
  print('0 : '+os.getcwd())
173
+ self.mimic_path = './mimic-iv/'+version
174
 
175
  #download config file if not custom
176
  if self.config_path[0:4] == 'http':