thbndi commited on
Commit
af564ea
·
1 Parent(s): bcf2d35

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +5 -4
Mimic4Dataset.py CHANGED
@@ -135,16 +135,17 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
135
  if self.config.name == 'Readmission' and self.config_path is None : self.config_path = _CONFIG_URLS['readmission']
136
  if self.config.name == 'Length of Stay' and self.config_path is None : self.config_path = _CONFIG_URLS['los']
137
  if self.config.name == 'Mortality' and self.config_path is None : self.config_path = _CONFIG_URLS['mortality']
138
-
 
 
 
 
139
  current_directory = os.getcwd()
140
  if os.path.exists(os.path.dirname(current_directory)+'/MIMIC-IV-Data-Pipeline-main'):
141
  dir =os.path.dirname(current_directory)
142
  os.chdir(dir)
143
  else:
144
  #move to parent directory of mimic data
145
- version = self.mimic_path.split('/')[-1]
146
- m = self.mimic_path.split('/')[-2]
147
- s='/'+m+'/'+version
148
  dir = self.mimic_path.replace(s,'')
149
  if dir[-1]!='/':
150
  dir=dir+'/'
 
135
  if self.config.name == 'Readmission' and self.config_path is None : self.config_path = _CONFIG_URLS['readmission']
136
  if self.config.name == 'Length of Stay' and self.config_path is None : self.config_path = _CONFIG_URLS['los']
137
  if self.config.name == 'Mortality' and self.config_path is None : self.config_path = _CONFIG_URLS['mortality']
138
+
139
+ version = self.mimic_path.split('/')[-1]
140
+ m = self.mimic_path.split('/')[-2]
141
+ s='/'+m+'/'+version
142
+
143
  current_directory = os.getcwd()
144
  if os.path.exists(os.path.dirname(current_directory)+'/MIMIC-IV-Data-Pipeline-main'):
145
  dir =os.path.dirname(current_directory)
146
  os.chdir(dir)
147
  else:
148
  #move to parent directory of mimic data
 
 
 
149
  dir = self.mimic_path.replace(s,'')
150
  if dir[-1]!='/':
151
  dir=dir+'/'