Update testb.py
Browse files
testb.py
CHANGED
@@ -28,7 +28,19 @@ class TestB(datasets.GeneratorBasedBuilder):
|
|
28 |
return datasets.DatasetInfo(
|
29 |
description='desc'
|
30 |
)
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
def _generate_examples(self, data_file, split):
|
33 |
with open(data_file, encoding="utf-8") as f:
|
34 |
for line in f:
|
|
|
28 |
return datasets.DatasetInfo(
|
29 |
description='desc'
|
30 |
)
|
31 |
+
def _split_generators(self, dl_manager):
|
32 |
+
dl_dir = dl_manager.download_and_extract(self.config.data_url) or ""
|
33 |
+
task_name = _get_task_name_from_data_url(self.config.data_url)
|
34 |
+
dl_dir = os.path.join(dl_dir, task_name)
|
35 |
+
return [
|
36 |
+
datasets.SplitGenerator(
|
37 |
+
name=datasets.Split.TRAIN,
|
38 |
+
gen_kwargs={
|
39 |
+
"data_file": os.path.join(dl_dir, "test.json"),
|
40 |
+
"split": datasets.Split.TRAIN,
|
41 |
+
},
|
42 |
+
)
|
43 |
+
]
|
44 |
def _generate_examples(self, data_file, split):
|
45 |
with open(data_file, encoding="utf-8") as f:
|
46 |
for line in f:
|