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

fix script

Browse files
Files changed (1) hide show
  1. binhvq_dedup.py +6 -1
binhvq_dedup.py CHANGED
@@ -72,8 +72,13 @@ class Binhvq(datasets.GeneratorBasedBuilder):
72
 
73
  def _generate_examples(self, filepath):
74
  logging.info(f"Generating examples from {filepath}")
 
 
 
 
 
75
  _id = 0
76
- reader = lm_dataformat.Reader(filepath)
77
  for doc in tqdm(reader.stream_data()):
78
  yield _id, {"text": doc}
79
  _id += 1
 
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"
78
+ shutil.move(abspath, newpath)
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