osbm commited on
Commit
fad69cc
·
1 Parent(s): d987cdb
Files changed (1) hide show
  1. zenodo.py +5 -3
zenodo.py CHANGED
@@ -96,14 +96,16 @@ class NewDataset(datasets.GeneratorBasedBuilder):
96
  return [
97
  datasets.SplitGenerator(
98
  name=datasets.Split.TRAIN,
99
- data_dir=data_dir[0],
 
 
100
  ),
101
  ]
102
 
103
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
104
- def _generate_examples(self, data_dir):
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", data_dir
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