Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +3 -2
Mimic4Dataset.py
CHANGED
@@ -145,14 +145,14 @@ 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 |
-
|
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 |
shutil.move(self.mimic_path, path_bench+'/mimic-iv/'+version)
|
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':
|
158 |
c = self.config_path.split('/')[-1]
|
@@ -188,6 +188,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
188 |
os.system(script)
|
189 |
root = path_bench.replace('/MIMIC-IV-Data-Pipeline-main',"")
|
190 |
os.chdir(root)
|
|
|
191 |
return [
|
192 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
|
193 |
]
|
|
|
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 |
shutil.move(self.mimic_path, path_bench+'/mimic-iv/'+version)
|
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':
|
158 |
c = self.config_path.split('/')[-1]
|
|
|
188 |
os.system(script)
|
189 |
root = path_bench.replace('/MIMIC-IV-Data-Pipeline-main',"")
|
190 |
os.chdir(root)
|
191 |
+
print(os.getcwd())
|
192 |
return [
|
193 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
|
194 |
]
|