Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +6 -8
Mimic4Dataset.py
CHANGED
@@ -6,6 +6,7 @@ import datasets
|
|
6 |
import pickle
|
7 |
#import cohort
|
8 |
from .test import print_test
|
|
|
9 |
|
10 |
_DESCRIPTION = """\
|
11 |
Dataset for mimic4 data, by default for the Mortality task.
|
@@ -16,7 +17,7 @@ mimic path should have this form :
|
|
16 |
|
17 |
_HOMEPAGE = "https://huggingface.co/datasets/thbndi/Mimic4Dataset"
|
18 |
_CITATION = "https://proceedings.mlr.press/v193/gupta22a.html"
|
19 |
-
_URL = "https://github.com/healthylaife/MIMIC-IV-Data-Pipeline
|
20 |
|
21 |
class Mimic4DatasetConfig(datasets.BuilderConfig):
|
22 |
"""BuilderConfig for Mimic4Dataset."""
|
@@ -132,13 +133,10 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
132 |
data_dir = self.config.data_dir + "/dataDic"
|
133 |
#mimic=self.mimic_path
|
134 |
data_dir = self.config.data_dir + "/dataDic"
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
local_path_git = dl_manager.extract(local_path_git)
|
140 |
-
print(local_path_git)
|
141 |
-
path_bench = local_path_git + "/MIMIC-IV-Data-Pipeline-main"
|
142 |
|
143 |
return [
|
144 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir, "benchmark": path_bench}),
|
|
|
6 |
import pickle
|
7 |
#import cohort
|
8 |
from .test import print_test
|
9 |
+
import subprocess
|
10 |
|
11 |
_DESCRIPTION = """\
|
12 |
Dataset for mimic4 data, by default for the Mortality task.
|
|
|
17 |
|
18 |
_HOMEPAGE = "https://huggingface.co/datasets/thbndi/Mimic4Dataset"
|
19 |
_CITATION = "https://proceedings.mlr.press/v193/gupta22a.html"
|
20 |
+
_URL = "https://github.com/healthylaife/MIMIC-IV-Data-Pipeline"
|
21 |
|
22 |
class Mimic4DatasetConfig(datasets.BuilderConfig):
|
23 |
"""BuilderConfig for Mimic4Dataset."""
|
|
|
133 |
data_dir = self.config.data_dir + "/dataDic"
|
134 |
#mimic=self.mimic_path
|
135 |
data_dir = self.config.data_dir + "/dataDic"
|
136 |
+
repodir = os.getcwd()
|
137 |
+
path_bench = repodir+'/MIMIC-IV-Data-Pipeline-main'
|
138 |
+
repo_url='https://github.com/healthylaife/MIMIC-IV-Data-Pipeline'
|
139 |
+
subprocess.run(["git", "clone", repo_url, repodir+'/MIMIC-IV-Data-Pipeline-main'])
|
|
|
|
|
|
|
140 |
|
141 |
return [
|
142 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir, "benchmark": path_bench}),
|