Arie Cattan commited on
Commit
2b83143
1 Parent(s): a7d20c7
Files changed (1) hide show
  1. scico.py +5 -0
scico.py CHANGED
@@ -2,6 +2,7 @@
2
 
3
  import os
4
  from datasets.arrow_dataset import DatasetTransformationNotAllowedError
 
5
  import jsonlines
6
  import datasets
7
 
@@ -84,4 +85,8 @@ class Scico(datasets.GeneratorBasedBuilder):
84
  print(filepath)
85
  with jsonlines.open(filepath, 'r') as f:
86
  for i, topic in enumerate(f):
 
 
 
 
87
  yield i, topic
 
2
 
3
  import os
4
  from datasets.arrow_dataset import DatasetTransformationNotAllowedError
5
+ from datasets.utils import metadata
6
  import jsonlines
7
  import datasets
8
 
 
85
  print(filepath)
86
  with jsonlines.open(filepath, 'r') as f:
87
  for i, topic in enumerate(f):
88
+ metadata = topic['metadata']
89
+ if '_merge' in metadata:
90
+ del metadata['_merge']
91
+ topic['metadata'] = metadata
92
  yield i, topic