Update disrpt.py
Browse files
disrpt.py
CHANGED
@@ -151,6 +151,7 @@ class Dataset(datasets.GeneratorBasedBuilder):
|
|
151 |
|
152 |
def _split_generators(self, dl_manager: datasets.DownloadManager):
|
153 |
cfg_name = self.config.name.rsplit('.', 1)[0]
|
|
|
154 |
data_dir = remove_type(self.config.data_dir)
|
155 |
print("datadir:",data_dir)
|
156 |
type = self.config.name.split('.')[-1]
|
@@ -165,7 +166,7 @@ class Dataset(datasets.GeneratorBasedBuilder):
|
|
165 |
split_generators = [
|
166 |
datasets.SplitGenerator(name=split, gen_kwargs={"filepath": data_file[f"{data_dir}-{key}.{type}"]})
|
167 |
for split, key in splits_dict.items()
|
168 |
-
if f"{data_dir}-{key}" in data_file
|
169 |
]
|
170 |
print(split_generators)
|
171 |
return split_generators
|
|
|
151 |
|
152 |
def _split_generators(self, dl_manager: datasets.DownloadManager):
|
153 |
cfg_name = self.config.name.rsplit('.', 1)[0]
|
154 |
+
task_type = self.config.name.split('.')[-1]
|
155 |
data_dir = remove_type(self.config.data_dir)
|
156 |
print("datadir:",data_dir)
|
157 |
type = self.config.name.split('.')[-1]
|
|
|
166 |
split_generators = [
|
167 |
datasets.SplitGenerator(name=split, gen_kwargs={"filepath": data_file[f"{data_dir}-{key}.{type}"]})
|
168 |
for split, key in splits_dict.items()
|
169 |
+
if f"{data_dir}-{key}.{task_type}" in data_file
|
170 |
]
|
171 |
print(split_generators)
|
172 |
return split_generators
|