Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +6 -5
Mimic4Dataset.py
CHANGED
|
@@ -44,13 +44,14 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
| 44 |
if not os.path.exists(self.mimic_path):
|
| 45 |
raise ValueError("The path of the mimic4 data does not exist")
|
| 46 |
|
| 47 |
-
self.config_path = kwargs.
|
| 48 |
self.task = kwargs.get("name",None)
|
| 49 |
-
if self.task == 'Phenotype' and self.config_path
|
| 50 |
-
if self.task == 'Readmission' and self.config_path
|
| 51 |
-
if self.task == 'Length of Stay' and self.config_path
|
| 52 |
-
if self.task == 'Mortality' and self.config_path
|
| 53 |
print(self.config_path)
|
|
|
|
| 54 |
super().__init__(**kwargs)
|
| 55 |
|
| 56 |
BUILDER_CONFIGS = [
|
|
|
|
| 44 |
if not os.path.exists(self.mimic_path):
|
| 45 |
raise ValueError("The path of the mimic4 data does not exist")
|
| 46 |
|
| 47 |
+
self.config_path = kwargs.get("config_path",None)
|
| 48 |
self.task = kwargs.get("name",None)
|
| 49 |
+
if self.task == 'Phenotype' and self.config_path is None : self.config_path = _CONFIG_URLS['phenotype']
|
| 50 |
+
if self.task == 'Readmission' and self.config_path is None : self.config_path = _CONFIG_URLS['readmission']
|
| 51 |
+
if self.task == 'Length of Stay' and self.config_path is None : self.config_path = _CONFIG_URLS['los']
|
| 52 |
+
if self.task == 'Mortality' and self.config_path is None : self.config_path = _CONFIG_URLS['mortality']
|
| 53 |
print(self.config_path)
|
| 54 |
+
print(self.task)
|
| 55 |
super().__init__(**kwargs)
|
| 56 |
|
| 57 |
BUILDER_CONFIGS = [
|