rdiehlmartinez commited on
Commit
a03a6bc
1 Parent(s): 2d574f4

fixing global_idx to update on each yield

Browse files
Files changed (1) hide show
  1. BabyLM.py +2 -1
BabyLM.py CHANGED
@@ -107,4 +107,5 @@ class BabyLM(datasets.GeneratorBasedBuilder):
107
  for filepath in filepaths:
108
  with open(filepath, encoding="utf-8") as f:
109
  for row in f:
110
- yield global_idx, {"text": row}
 
 
107
  for filepath in filepaths:
108
  with open(filepath, encoding="utf-8") as f:
109
  for row in f:
110
+ yield global_idx, {"text": row}
111
+ global_idx += 1