Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +7 -2
Mimic4Dataset.py
CHANGED
@@ -145,13 +145,18 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
145 |
path_bench = repodir+'/MIMIC-IV-Data-Pipeline-main'
|
146 |
subprocess.run(["git", "clone", repo_url, path_bench])
|
147 |
os.chdir(path_bench)
|
148 |
-
print(os.getcwd())
|
|
|
149 |
#move data to mimic-iv folder
|
150 |
if not os.path.exists(path_bench+'/mimic-iv'):
|
151 |
os.makedirs(path_bench+'/mimic-iv')
|
152 |
version = self.mimic_path.split('/')[-1]
|
153 |
-
|
|
|
|
|
154 |
self.mimic_path = path_bench+'/mimic-iv/'+version
|
|
|
|
|
155 |
|
156 |
#download config file if not custom
|
157 |
if self.config_path[0:4] == 'http':
|
|
|
145 |
path_bench = repodir+'/MIMIC-IV-Data-Pipeline-main'
|
146 |
subprocess.run(["git", "clone", repo_url, path_bench])
|
147 |
os.chdir(path_bench)
|
148 |
+
print('1 : '+ os.getcwd())
|
149 |
+
|
150 |
#move data to mimic-iv folder
|
151 |
if not os.path.exists(path_bench+'/mimic-iv'):
|
152 |
os.makedirs(path_bench+'/mimic-iv')
|
153 |
version = self.mimic_path.split('/')[-1]
|
154 |
+
os.chdir(self.mimic_path.replace(version,''))
|
155 |
+
print('2 : '+os.getcwd())
|
156 |
+
shutil.move('/'+version, path_bench+'/mimic-iv/'+version)
|
157 |
self.mimic_path = path_bench+'/mimic-iv/'+version
|
158 |
+
os.chdir(path_bench)
|
159 |
+
print('3 : '+os.getcwd())
|
160 |
|
161 |
#download config file if not custom
|
162 |
if self.config_path[0:4] == 'http':
|