andreped commited on
Commit
18402ce
·
1 Parent(s): 6d3ecc1

Remove redundant methods in dataset class

Browse files
Files changed (1) hide show
  1. AeroPath.py +11 -2
AeroPath.py CHANGED
@@ -82,6 +82,14 @@ class AeroPath(datasets.GeneratorBasedBuilder):
82
 
83
  DEFAULT_CONFIG_NAME = "zenodo" # It's not mandatory to have a default configuration. Just use one if it make sense.
84
 
 
 
 
 
 
 
 
 
85
  def _info(self):
86
  # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
87
  if self.config.name == "zenodo": # This is the name of the configuration selected in BUILDER_CONFIGS above
@@ -94,7 +102,7 @@ class AeroPath(datasets.GeneratorBasedBuilder):
94
  }
95
  )
96
  else:
97
- raise ValueError("Only 'Zenodo' is supported.")# This is an example to show how to have different features for "first_domain" and "second_domain"
98
 
99
  return datasets.DatasetInfo(
100
  # This is the description that will appear on the datasets page.
@@ -167,4 +175,5 @@ class AeroPath(datasets.GeneratorBasedBuilder):
167
  "sentence": data["sentence"],
168
  "option2": data["option2"],
169
  "second_domain_answer": "" if split == "test" else data["second_domain_answer"],
170
- }
 
 
82
 
83
  DEFAULT_CONFIG_NAME = "zenodo" # It's not mandatory to have a default configuration. Just use one if it make sense.
84
 
85
+ def get_data_paths(self):
86
+ return
87
+
88
+ def get_patient(self, patient_id):
89
+ if (patient_id < 1) or (patiend_id > 27):
90
+ raise ValueError("patient_id should be an integer in range [1, 27].")
91
+
92
+ """
93
  def _info(self):
94
  # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
95
  if self.config.name == "zenodo": # This is the name of the configuration selected in BUILDER_CONFIGS above
 
102
  }
103
  )
104
  else:
105
+ raise ValueError("Only 'zenodo' is supported.")# This is an example to show how to have different features for "first_domain" and "second_domain"
106
 
107
  return datasets.DatasetInfo(
108
  # This is the description that will appear on the datasets page.
 
175
  "sentence": data["sentence"],
176
  "option2": data["option2"],
177
  "second_domain_answer": "" if split == "test" else data["second_domain_answer"],
178
+ }
179
+ """