fix script
Browse files- binhvq_dedup.py +2 -7
binhvq_dedup.py
CHANGED
@@ -72,13 +72,8 @@ class Binhvq(datasets.GeneratorBasedBuilder):
|
|
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"
|
78 |
-
shutil.move(abspath, newpath)
|
79 |
-
|
80 |
_id = 0
|
81 |
-
reader = lm_dataformat.Reader(
|
82 |
-
for doc in tqdm(reader.read_json(
|
83 |
yield _id, {"text": doc}
|
84 |
_id += 1
|
|
|
72 |
|
73 |
def _generate_examples(self, filepath):
|
74 |
logging.warning(f"Generating examples from {filepath}")
|
|
|
|
|
|
|
|
|
|
|
75 |
_id = 0
|
76 |
+
reader = lm_dataformat.Reader(filepath)
|
77 |
+
for doc in tqdm(reader.read_json(filepath)):
|
78 |
yield _id, {"text": doc}
|
79 |
_id += 1
|