imthanhlv commited on
Commit
2d7effc
1 Parent(s): 30b8eec

fix script

Browse files
Files changed (1) hide show
  1. binhvq_dedup.py +2 -2
binhvq_dedup.py CHANGED
@@ -71,7 +71,7 @@ class Binhvq(datasets.GeneratorBasedBuilder):
71
  ]
72
 
73
  def _generate_examples(self, filepath):
74
- logging.info(f"Generating examples from {filepath}")
75
  import shutil
76
  abspath = os.path.abspath(filepath)
77
  newpath = abspath + ".jsonl.zst"
@@ -79,6 +79,6 @@ class Binhvq(datasets.GeneratorBasedBuilder):
79
 
80
  _id = 0
81
  reader = lm_dataformat.Reader(newpath)
82
- for doc in tqdm(reader.stream_data()):
83
  yield _id, {"text": doc}
84
  _id += 1
 
71
  ]
72
 
73
  def _generate_examples(self, filepath):
74
+ logging.warning(f"Generating examples from {filepath}")
75
  import shutil
76
  abspath = os.path.abspath(filepath)
77
  newpath = abspath + ".jsonl.zst"
 
79
 
80
  _id = 0
81
  reader = lm_dataformat.Reader(newpath)
82
+ for doc in tqdm(reader.read_json(newpath)):
83
  yield _id, {"text": doc}
84
  _id += 1