Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +4 -2
Mimic4Dataset.py
CHANGED
@@ -194,12 +194,14 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
194 |
file_path, head = urlretrieve(_COHORT, "cohort.py")
|
195 |
if not os.path.exists('cohort.py'):
|
196 |
shutil.move(file_path, './')
|
197 |
-
|
198 |
data_dir = "./data/dict/"+self.config.name+"/dataDic"
|
199 |
sys.path.append(path_bench)
|
200 |
config = self.config_path.split('/')[-1]
|
|
|
201 |
script = 'python cohort.py '+ self.config.name +" "+ self.mimic_path+ " "+path_bench+ " "+config
|
202 |
-
os.
|
|
|
203 |
return [
|
204 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
|
205 |
]
|
|
|
194 |
file_path, head = urlretrieve(_COHORT, "cohort.py")
|
195 |
if not os.path.exists('cohort.py'):
|
196 |
shutil.move(file_path, './')
|
197 |
+
|
198 |
data_dir = "./data/dict/"+self.config.name+"/dataDic"
|
199 |
sys.path.append(path_bench)
|
200 |
config = self.config_path.split('/')[-1]
|
201 |
+
|
202 |
script = 'python cohort.py '+ self.config.name +" "+ self.mimic_path+ " "+path_bench+ " "+config
|
203 |
+
if not os.path.exists(data_dir) :
|
204 |
+
os.system(script)
|
205 |
return [
|
206 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
|
207 |
]
|