fix
Browse files
zenodo.py
CHANGED
|
@@ -96,14 +96,16 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
| 96 |
return [
|
| 97 |
datasets.SplitGenerator(
|
| 98 |
name=datasets.Split.TRAIN,
|
| 99 |
-
|
|
|
|
|
|
|
| 100 |
),
|
| 101 |
]
|
| 102 |
|
| 103 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
| 104 |
-
def _generate_examples(self,
|
| 105 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
| 106 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
| 107 |
|
| 108 |
-
yield "path",
|
| 109 |
|
|
|
|
| 96 |
return [
|
| 97 |
datasets.SplitGenerator(
|
| 98 |
name=datasets.Split.TRAIN,
|
| 99 |
+
gen_kwargs={
|
| 100 |
+
"filepath": data_dir[0],
|
| 101 |
+
},
|
| 102 |
),
|
| 103 |
]
|
| 104 |
|
| 105 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
| 106 |
+
def _generate_examples(self, filepath):
|
| 107 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
| 108 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
| 109 |
|
| 110 |
+
yield "path", filepath
|
| 111 |
|