Update files from the datasets library (from 1.5.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.5.0
- math_dataset.py +3 -3
math_dataset.py
CHANGED
|
@@ -232,9 +232,9 @@ class MathDataset(datasets.GeneratorBasedBuilder):
|
|
| 232 |
with open(data_file, encoding="utf-8") as f:
|
| 233 |
ls = f.read().split("\n")
|
| 234 |
|
| 235 |
-
for
|
| 236 |
-
if not
|
| 237 |
-
ls.remove(
|
| 238 |
|
| 239 |
lines.extend(ls)
|
| 240 |
|
|
|
|
| 232 |
with open(data_file, encoding="utf-8") as f:
|
| 233 |
ls = f.read().split("\n")
|
| 234 |
|
| 235 |
+
for line in ls[::-1]:
|
| 236 |
+
if not line:
|
| 237 |
+
ls.remove(line)
|
| 238 |
|
| 239 |
lines.extend(ls)
|
| 240 |
|