Datasets:

ArXiv:
License:
PeterTor commited on
Commit
d5253c6
·
verified ·
1 Parent(s): d964989

Update BioMap.py

Browse files
Files changed (1) hide show
  1. BioMap.py +6 -7
BioMap.py CHANGED
@@ -120,14 +120,13 @@ class NewDataset(datasets.GeneratorBasedBuilder):
120
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
121
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
122
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
123
- urls = _URLS[self.config.name]
124
- data_dir = dl_manager.download_and_extract(urls)
125
  return [
126
  datasets.SplitGenerator(
127
  name=datasets.Split.TRAIN,
128
  # These kwargs will be passed to _generate_examples
129
  gen_kwargs={
130
- "filepath": os.path.join(data_dir, "train.jsonl"),
131
  "split": "train",
132
  },
133
  ),
@@ -135,22 +134,22 @@ class NewDataset(datasets.GeneratorBasedBuilder):
135
  name=datasets.Split.VALIDATION,
136
  # These kwargs will be passed to _generate_examples
137
  gen_kwargs={
138
- "filepath": os.path.join(data_dir, "dev.jsonl"),
139
- "split": "dev",
140
  },
141
  ),
142
  datasets.SplitGenerator(
143
  name=datasets.Split.TEST,
144
  # These kwargs will be passed to _generate_examples
145
  gen_kwargs={
146
- "filepath": os.path.join(data_dir, "test.jsonl"),
147
  "split": "test"
148
  },
149
  ),
150
  ]
151
 
152
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
153
- def _generate_examples(self, filepath, split):
154
  for i,d in enumerate(self.ds[split]):
155
  if self.config.name == "default":
156
  yield i, {
 
120
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
121
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
122
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
123
+
 
124
  return [
125
  datasets.SplitGenerator(
126
  name=datasets.Split.TRAIN,
127
  # These kwargs will be passed to _generate_examples
128
  gen_kwargs={
129
+
130
  "split": "train",
131
  },
132
  ),
 
134
  name=datasets.Split.VALIDATION,
135
  # These kwargs will be passed to _generate_examples
136
  gen_kwargs={
137
+
138
+ "split": "val",
139
  },
140
  ),
141
  datasets.SplitGenerator(
142
  name=datasets.Split.TEST,
143
  # These kwargs will be passed to _generate_examples
144
  gen_kwargs={
145
+
146
  "split": "test"
147
  },
148
  ),
149
  ]
150
 
151
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
152
+ def _generate_examples(self, split):
153
  for i,d in enumerate(self.ds[split]):
154
  if self.config.name == "default":
155
  yield i, {