Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +3 -1
Mimic4Dataset.py
CHANGED
@@ -5,6 +5,7 @@ import pandas as pd
|
|
5 |
import datasets
|
6 |
import pickle
|
7 |
#import cohort
|
|
|
8 |
from .test import print_test
|
9 |
|
10 |
_DESCRIPTION = """\
|
@@ -133,7 +134,8 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
133 |
#mimic=self.mimic_path
|
134 |
data_dir = self.config.data_dir + "/dataDic"
|
135 |
path_git = dl_manager.download_and_extract(_URL)
|
136 |
-
|
|
|
137 |
return [
|
138 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir, "benchmark": path_bench}),
|
139 |
]
|
|
|
5 |
import datasets
|
6 |
import pickle
|
7 |
#import cohort
|
8 |
+
from datasets.utils import DownloadManager, extract_path_from_uri
|
9 |
from .test import print_test
|
10 |
|
11 |
_DESCRIPTION = """\
|
|
|
134 |
#mimic=self.mimic_path
|
135 |
data_dir = self.config.data_dir + "/dataDic"
|
136 |
path_git = dl_manager.download_and_extract(_URL)
|
137 |
+
local_path_git = extract_path_from_uri(path_git)
|
138 |
+
path_bench = local_path_git + "/MIMIC-IV-Data-Pipeline-main"
|
139 |
return [
|
140 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir, "benchmark": path_bench}),
|
141 |
]
|