zhangir-azerbayev
commited on
Commit
·
4ac09d9
1
Parent(s):
2ddb8e5
fix dataloader
Browse files- proof-pile-2.py +2 -24
proof-pile-2.py
CHANGED
|
@@ -19,29 +19,6 @@ A dataset of high quality mathematical text. """
|
|
| 19 |
_HOMEPAGE = "https://github.com/EleutherAI/math-lm"
|
| 20 |
|
| 21 |
|
| 22 |
-
SPLITS = ["train", "validation", "test"]
|
| 23 |
-
|
| 24 |
-
_DATA_PATHS = {
|
| 25 |
-
"arxiv": {
|
| 26 |
-
split: [f'arxiv/{split}/arXiv_{str(i).zfill(3)}.jsonl.zst' for i in range(100)]
|
| 27 |
-
for split in SPLITS
|
| 28 |
-
},
|
| 29 |
-
"open-web-math": {
|
| 30 |
-
split: [
|
| 31 |
-
os.path.join(f"open-web-math/{split}", filename)
|
| 32 |
-
for filename in os.listdir(f"open-web-math/{split}")
|
| 33 |
-
]
|
| 34 |
-
for split in SPLITS
|
| 35 |
-
},
|
| 36 |
-
"algebraic-stack": {
|
| 37 |
-
split: [
|
| 38 |
-
os.path.join(f"algebraic-stack/{split}", filename)
|
| 39 |
-
for filename in os.listdir(f"algebraic-stack/{split}")
|
| 40 |
-
]
|
| 41 |
-
for split in SPLITS
|
| 42 |
-
}
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
class ProofPile2Config(datasets.BuilderConfig):
|
| 46 |
"""BuilderConfig for RedPajama sample."""
|
| 47 |
|
|
@@ -72,7 +49,7 @@ class ProofPile2(datasets.GeneratorBasedBuilder):
|
|
| 72 |
BUILDER_CONFIGS = [
|
| 73 |
ProofPile2Config(
|
| 74 |
name='default',
|
| 75 |
-
subsets=
|
| 76 |
version=VERSION,
|
| 77 |
description="All subsets"
|
| 78 |
),
|
|
@@ -123,6 +100,7 @@ class ProofPile2(datasets.GeneratorBasedBuilder):
|
|
| 123 |
x
|
| 124 |
for subset in self.config.subsets
|
| 125 |
for x in dl_manager.iter_files(os.path.join(subset, split))
|
|
|
|
| 126 |
]
|
| 127 |
))
|
| 128 |
},
|
|
|
|
| 19 |
_HOMEPAGE = "https://github.com/EleutherAI/math-lm"
|
| 20 |
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
class ProofPile2Config(datasets.BuilderConfig):
|
| 23 |
"""BuilderConfig for RedPajama sample."""
|
| 24 |
|
|
|
|
| 49 |
BUILDER_CONFIGS = [
|
| 50 |
ProofPile2Config(
|
| 51 |
name='default',
|
| 52 |
+
subsets=['arxiv', 'open-web-math', 'algebraic-stack'],
|
| 53 |
version=VERSION,
|
| 54 |
description="All subsets"
|
| 55 |
),
|
|
|
|
| 100 |
x
|
| 101 |
for subset in self.config.subsets
|
| 102 |
for x in dl_manager.iter_files(os.path.join(subset, split))
|
| 103 |
+
for subset in self.config.subsets
|
| 104 |
]
|
| 105 |
))
|
| 106 |
},
|