dichspace commited on
Commit
942706b
1 Parent(s): 1464331

patching the id issue

Browse files
Files changed (1) hide show
  1. darulm.py +3 -1
darulm.py CHANGED
@@ -159,10 +159,12 @@ class DarulmDataset(datasets.GeneratorBasedBuilder):
159
  ]
160
 
161
  def _generate_examples(self, paths):
 
162
  for path in paths:
163
  with open(path, "rb") as f:
164
  cctx = zstandard.ZstdDecompressor()
165
  reader_stream = io.BufferedReader(cctx.stream_reader(f))
166
  reader = jsonlines.Reader(reader_stream, loads=parse_json)
167
  for id_, item in enumerate(reader):
168
- yield id_, item
 
 
159
  ]
160
 
161
  def _generate_examples(self, paths):
162
+ true_id = 0
163
  for path in paths:
164
  with open(path, "rb") as f:
165
  cctx = zstandard.ZstdDecompressor()
166
  reader_stream = io.BufferedReader(cctx.stream_reader(f))
167
  reader = jsonlines.Reader(reader_stream, loads=parse_json)
168
  for id_, item in enumerate(reader):
169
+ yield true_id, item
170
+ true_id += 1