Datasets:
schen149
commited on
Commit
·
bb57a96
1
Parent(s):
35373f3
updating dataset loader
Browse files- propsegment.py +1 -1
propsegment.py
CHANGED
@@ -165,7 +165,7 @@ class PropSegment(datasets.GeneratorBasedBuilder):
|
|
165 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
166 |
def _generate_examples(self, filepath, split):
|
167 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
168 |
-
with open(filepath, encoding="utf-8") as f:
|
169 |
for key, row in enumerate(f):
|
170 |
data = json.loads(row)
|
171 |
if self.config.name == "segmentation":
|
|
|
165 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
166 |
def _generate_examples(self, filepath, split):
|
167 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
168 |
+
with open(filepath[split], encoding="utf-8") as f:
|
169 |
for key, row in enumerate(f):
|
170 |
data = json.loads(row)
|
171 |
if self.config.name == "segmentation":
|