Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
parquet-converter
commited on
Commit
•
450ed96
1
Parent(s):
61ee58e
Update parquet files
Browse files- .gitignore +0 -1
- README.md +0 -100
- dev/proofpile_dev.jsonl.gz → default/partial-test/0000.parquet +2 -2
- formal/afp_train.jsonl.gz → default/partial-test/0001.parquet +2 -2
- formal/coq_train.jsonl.gz → default/partial-train/0000.parquet +2 -2
- default/partial-train/0001.parquet +3 -0
- default/partial-train/0002.parquet +3 -0
- default/partial-train/0003.parquet +3 -0
- default/partial-train/0004.parquet +3 -0
- default/partial-train/0005.parquet +3 -0
- default/partial-train/0006.parquet +3 -0
- default/partial-train/0007.parquet +3 -0
- default/partial-train/0008.parquet +3 -0
- default/partial-train/0009.parquet +3 -0
- default/partial-validation/0000.parquet +3 -0
- formal/afp_val.jsonl.gz → default/partial-validation/0001.parquet +2 -2
- example.py +0 -26
- formal/coq_val.jsonl.gz +0 -3
- formal/hol_train.jsonl.gz +0 -3
- formal/hol_val.jsonl.gz +0 -3
- formal/lean_train.jsonl.gz +0 -3
- formal/lean_val.jsonl.gz +0 -3
- formal/mizar_train.jsonl.gz +0 -3
- formal/mizar_val.jsonl.gz +0 -3
- formal/setmm_train.jsonl.gz +0 -3
- formal/setmm_val.jsonl.gz +0 -3
- proof-pile.py +0 -149
- test/proofpile_test.jsonl.gz +0 -3
- train/proofpile_train_0.jsonl.gz +0 -3
- train/proofpile_train_1.jsonl.gz +0 -3
- train/proofpile_train_2.jsonl.gz +0 -3
- train/proofpile_train_3.jsonl.gz +0 -3
- train/proofpile_train_4.jsonl.gz +0 -3
- train/proofpile_train_5.jsonl.gz +0 -3
- train/proofpile_train_6.jsonl.gz +0 -3
- train/proofpile_train_7.jsonl.gz +0 -3
.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
*.lock
|
|
|
|
README.md
DELETED
@@ -1,100 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- no-annotation
|
4 |
-
language:
|
5 |
-
- en
|
6 |
-
language_creators:
|
7 |
-
- found
|
8 |
-
license: []
|
9 |
-
multilinguality:
|
10 |
-
- monolingual
|
11 |
-
pretty_name: proof-pile
|
12 |
-
size_categories: []
|
13 |
-
source_datasets: []
|
14 |
-
tags:
|
15 |
-
- math
|
16 |
-
- mathematics
|
17 |
-
- formal-mathematics
|
18 |
-
task_categories:
|
19 |
-
- text-generation
|
20 |
-
task_ids:
|
21 |
-
- language-modeling
|
22 |
-
---
|
23 |
-
|
24 |
-
# Dataset Description
|
25 |
-
The `proof-pile` is a 36GB pre-training dataset of mathematical text that comprises roughly 15 billion tokens. Models trained on this dataset are coming soon :) The dataset is composed of diverse sources of both informal and formal mathematics, namely
|
26 |
-
- ArXiv.math (35GB)
|
27 |
-
- Open-source math textbooks (50MB)
|
28 |
-
- Formal mathematics libraries (500MB)
|
29 |
-
- Lean mathlib and other Lean repositories
|
30 |
-
- Isabelle AFP
|
31 |
-
- Coq mathematical components and other Coq repositories
|
32 |
-
- HOL Light
|
33 |
-
- set.mm
|
34 |
-
- Mizar Mathematical Library
|
35 |
-
- Math Overflow and Math Stack Exchange (500MB)
|
36 |
-
- Wiki-style sources (50MB)
|
37 |
-
- ProofWiki
|
38 |
-
- Wikipedia math articles
|
39 |
-
- MATH dataset (6MB)
|
40 |
-
|
41 |
-
The construction of the dataset is reproducible using the code and instructions in the [proof-pile Github
|
42 |
-
repo](https://github.com/zhangir-azerbayev/proof-pile).
|
43 |
-
|
44 |
-
# Supported Tasks
|
45 |
-
This dataset is intended to be used for pre-training and fine-tuning language models. We envision models trained on the `proof-pile` will have many downstream applications, including informal quantitative reasoning, formal theorem proving, semantic search for formal mathematics, and autoformalization.
|
46 |
-
|
47 |
-
# Languages
|
48 |
-
All informal mathematics in the `proof-pile` is written in English and LaTeX (arXiv articles in other languages are filtered out using [languagedetect](https://github.com/shuyo/language-detection/blob/wiki/ProjectHome.md)). Formal theorem proving languages represented in this dataset are Lean 3, Isabelle, Coq, HOL Light, Metamath, and Mizar.
|
49 |
-
|
50 |
-
# Evaluation
|
51 |
-
The version of `set.mm` in this dataset has 10% of proofs replaced with the `?` character in order to preserve a validation and test set for Metamath provers pre-trained on the `proof-pile`. The precise split can be found here: [validation](https://github.com/zhangir-azerbayev/mm-extract/blob/main/valid_decls.json) and [test](https://github.com/zhangir-azerbayev/mm-extract/blob/main/test_decls.json).
|
52 |
-
The Lean mathlib commit used in this dataset is `6313863`. Theorems created in subsequent commits can be used for evaluating Lean theorem provers.
|
53 |
-
|
54 |
-
This dataset contains only the training set of the [MATH dataset](https://github.com/hendrycks/math). However, because this dataset contains ProofWiki, the Stacks Project, Trench's Analysis, and Stein's Number Theory, models trained on it cannot be evaluated on the [NaturalProofs dataset](https://github.com/wellecks/naturalproofs).
|
55 |
-
|
56 |
-
# Data Preprocessing
|
57 |
-
This section describes any significant filtering and transformations made to various subsets of the data.
|
58 |
-
|
59 |
-
**arXiv.math.**
|
60 |
-
The arXiv.math dataset is large, heterogeneous, and contains a great deal of noise. We used the following heuristics
|
61 |
-
when choosing which files from arXiv.math source folders to include in the dataset:
|
62 |
-
- Keep only files with a `.tex` extension.
|
63 |
-
- Only include files that use either a `utf-8/16/32` or `latin-1` text encoding.
|
64 |
-
- Discard files that do not contain a part, chapter, section, sub...section, paragraph, or subparagraph heading.
|
65 |
-
- Delete files that contain the keyword `gnuplot`. Gnuplot-latex is an old command line utility that generates blocks
|
66 |
-
of entirely unintelligible source.
|
67 |
-
- Include only articles in English, as determined by the [langdetect library](https://pypi.org/project/langdetect/). \n",
|
68 |
-
"\n",
|
69 |
-
- Exclude files shorter than 280 characters (characters counted after substring removal described below).
|
70 |
-
|
71 |
-
In addition, we apply the following transformations to arXiv.math texts:
|
72 |
-
|
73 |
-
- Delete everything outside of `\begin{document}` and `\end{document}`.
|
74 |
-
- Delete everything including or after `\Refs`, `\begin{thebibliography}`, or `\begin{bibdiv}`
|
75 |
-
- Delete comments.
|
76 |
-
- Any more than three consecutive newlines are replaced by three consecutive newlines.
|
77 |
-
In [this notebook](https://github.com/zhangir-azerbayev/proof-pile/blob/main/analysis/arxiv_noisedetection.ipynb), we provide an analysis of the prevalence of noisy documents in the arXiv.math subset of the
|
78 |
-
proof-pile.
|
79 |
-
|
80 |
-
**Stack Exchange.**
|
81 |
-
We only include questions that have at least 5 upvotes and an answer. We format Stack Exchange posts as follows
|
82 |
-
```
|
83 |
-
QUESTION [{num_upvotes} upvotes]: {text of question}
|
84 |
-
|
85 |
-
REPLY [{num_upvotes} votes]: {text of reply}
|
86 |
-
|
87 |
-
REPLY [{num_upvotes} votes]: {text of reply}
|
88 |
-
|
89 |
-
.
|
90 |
-
.
|
91 |
-
.
|
92 |
-
```
|
93 |
-
|
94 |
-
**set.mm.**
|
95 |
-
We converted `set.mm` into human-readable form by following the instructions in the [mm-extract repo](https://github.com/zhangir-azerbayev/mm-extract)
|
96 |
-
|
97 |
-
## Contributions
|
98 |
-
Authors: Zhangir Azerbayev, Edward Ayers, Bartosz Piotrowski.
|
99 |
-
|
100 |
-
We would like to thank Jeremy Avigad, Albert Jiang, and Wenda Li for their invaluable guidance, and the Hoskinson Center for Formal Mathematics for its support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dev/proofpile_dev.jsonl.gz → default/partial-test/0000.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5de687a23ad7273f9f93c7dbdc7c6e77744f130527092efbbdd1aa5f44f7e7f4
|
3 |
+
size 230154170
|
formal/afp_train.jsonl.gz → default/partial-test/0001.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2121be666a6c3a6825459555523090c3ffb08892155356154cd509225f7f0700
|
3 |
+
size 30168961
|
formal/coq_train.jsonl.gz → default/partial-train/0000.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5db4c29e0ff94e5812aa64057b4580d8d6d9e6c7a6db5a32afa40d4c8fe8d453
|
3 |
+
size 227605020
|
default/partial-train/0001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ef6b8b4d35151ab883d4035036d8080745d4b6b2a36c15e9cc7f008d74c26163
|
3 |
+
size 227549868
|
default/partial-train/0002.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d8b5aaf536f9620638e7e22a318d8e5656f4e0c6db78bf53f63b62f8e5d94aef
|
3 |
+
size 227381629
|
default/partial-train/0003.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aec4b2d47d0db2cb4900e655f753fdd8f8385b33182dae7f66fefaeb614c091c
|
3 |
+
size 228255548
|
default/partial-train/0004.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b7a0c72a98c40a078c5eacf3a106828f68395135bdfaba2ec4f9cc6673032b1
|
3 |
+
size 229845032
|
default/partial-train/0005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b197ae2131e5ac240228748574a5596a74322a0faf240fcb0e0d428726e232b
|
3 |
+
size 230760904
|
default/partial-train/0006.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0dfd7e08c9c403853a0809a9b6dff3ff8fa59572a9f1a7de61b3bae490c478c7
|
3 |
+
size 231439920
|
default/partial-train/0007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:781809b1f7e27a2333e07a122392f81eb6f45cf54fa0124945d49d21a29166e5
|
3 |
+
size 228395703
|
default/partial-train/0008.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3139bfb99953a4d7c294b6b42c6d86f657c6d08258ca26966c4052422aa72792
|
3 |
+
size 228682445
|
default/partial-train/0009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d463130819c65740cb09dcf51c73eb3832ee47ba32364af33abd1932e5c9e5a4
|
3 |
+
size 193406030
|
default/partial-validation/0000.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c913e24ec77a0497fc118721234ba2d367fcf2822696e777e954356de7181506
|
3 |
+
size 230496142
|
formal/afp_val.jsonl.gz → default/partial-validation/0001.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:864b5b6c04865d2275efc806382db4bbcc1245050b77850540df8a8aa01d39fd
|
3 |
+
size 28620687
|
example.py
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
from datasets import load_dataset
|
2 |
-
from itertools import islice
|
3 |
-
import sys
|
4 |
-
import time
|
5 |
-
from tqdm import tqdm
|
6 |
-
|
7 |
-
dataset = load_dataset("./proof-pile.py", "default")
|
8 |
-
|
9 |
-
size = dataset["train"].dataset_size / 2**30
|
10 |
-
print(f"{size} GB TRAIN TOTAL")
|
11 |
-
print(dataset)
|
12 |
-
for x in tqdm(dataset["train"]):
|
13 |
-
print("EXAMPLE INSTANCE (trimmed):")
|
14 |
-
print(x["text"][:100])
|
15 |
-
break
|
16 |
-
|
17 |
-
then = time.time()
|
18 |
-
for x in tqdm(dataset["train"]):
|
19 |
-
pass
|
20 |
-
now = time.time()
|
21 |
-
print(f"{size} GB TRAIN TOTAL")
|
22 |
-
print(f"TRAVERSED IN {now-then} SECONDS")
|
23 |
-
|
24 |
-
size += dataset["validation"].dataset_size/2**30 + dataset["test"].dataset_size/2**30
|
25 |
-
print(f"{size} GB TOTAL (TRAIN, VAL, TEST)")
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formal/coq_val.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:7e34411db12a3c4dc95c1dce3bfd198771b05916aceb821d565341870458ea6e
|
3 |
-
size 139624
|
|
|
|
|
|
|
|
formal/hol_train.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:23bef79158a370cac2ded01004869e3c7a64d345993deeb7ae9ee2df500bb0bf
|
3 |
-
size 5326465
|
|
|
|
|
|
|
|
formal/hol_val.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:1bf3593dcd77b5ceee44bb1cc702a754f1fa9330daa145f38d5d2d048b31332b
|
3 |
-
size 324645
|
|
|
|
|
|
|
|
formal/lean_train.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:14d3b07aababcda09a5480bf6f2f3011c49ec73be2ead91cb0772dbfbef3b7ff
|
3 |
-
size 9306443
|
|
|
|
|
|
|
|
formal/lean_val.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:8c101902aa857285660bccbf7cd56f0c4ef54c825aaf31d4da7fc69c7559bfbe
|
3 |
-
size 567956
|
|
|
|
|
|
|
|
formal/mizar_train.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e1a8b52f7a338b43defd173c42e1fc67c3acd8b3113e1230a21482234bff9566
|
3 |
-
size 18618814
|
|
|
|
|
|
|
|
formal/mizar_val.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:4fc71207e51e673e4f58fb18e460c5aad54f793010fa273e63c747462916388d
|
3 |
-
size 626988
|
|
|
|
|
|
|
|
formal/setmm_train.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:d6540c3eb70e23597429ff330b00b024512f05a457743415d9ed132886068be8
|
3 |
-
size 22411600
|
|
|
|
|
|
|
|
formal/setmm_val.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:236fc9d544f2c96adfc9b559910022fd354cef34f08956e91ee97609b027511f
|
3 |
-
size 36
|
|
|
|
|
|
|
|
proof-pile.py
DELETED
@@ -1,149 +0,0 @@
|
|
1 |
-
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
-
# you may not use this file except in compliance with the License.
|
5 |
-
# You may obtain a copy of the License at
|
6 |
-
#
|
7 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
"""A dataset of high quality mathematical text."""
|
15 |
-
|
16 |
-
|
17 |
-
import csv
|
18 |
-
import json
|
19 |
-
import ndjson
|
20 |
-
import os
|
21 |
-
import sys # just for debugging, delete
|
22 |
-
|
23 |
-
import itertools
|
24 |
-
from itertools import islice
|
25 |
-
|
26 |
-
import datasets
|
27 |
-
|
28 |
-
|
29 |
-
# TODO: Add BibTeX citation
|
30 |
-
# Find for instance the citation on arxiv or on the dataset repo/website
|
31 |
-
_CITATION = """\
|
32 |
-
@InProceedings{huggingface:dataset,
|
33 |
-
title = {proof-pile},
|
34 |
-
author={Zhangir Azerbayev, Edward Ayers, Bartosz Piotrowski
|
35 |
-
},
|
36 |
-
year={2022}
|
37 |
-
}
|
38 |
-
"""
|
39 |
-
|
40 |
-
# TODO: Add description of the dataset here
|
41 |
-
# You can copy an official description
|
42 |
-
_DESCRIPTION = """\
|
43 |
-
A dataset of high quality mathematical text. """
|
44 |
-
_HOMEPAGE = "https://huggingface.co/datasets/hoskinson-center/proof-pile"
|
45 |
-
|
46 |
-
# TODO: Add the licence for the dataset here if you can find it
|
47 |
-
_LICENSE = "MIT"
|
48 |
-
|
49 |
-
# TODO: Add link to the official dataset URLs here
|
50 |
-
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
51 |
-
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
52 |
-
_URLS = {
|
53 |
-
"first_domain": "https://huggingface.co/datasets/hoskinson-center/proof-pile",
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
# TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
|
58 |
-
class ProofPile(datasets.GeneratorBasedBuilder):
|
59 |
-
"""A dataset of high quality mathematical text"""
|
60 |
-
|
61 |
-
VERSION = datasets.Version("1.0.0")
|
62 |
-
|
63 |
-
# This is an example of a dataset with multiple configurations.
|
64 |
-
# If you don't want/need to define several sub-sets in your dataset,
|
65 |
-
# just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
|
66 |
-
|
67 |
-
# If you need to make complex sub-parts in the datasets with configurable options
|
68 |
-
# You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
|
69 |
-
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
70 |
-
|
71 |
-
# You will be able to load one or the other configurations in the following list with
|
72 |
-
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
73 |
-
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
74 |
-
BUILDER_CONFIGS = [
|
75 |
-
datasets.BuilderConfig(name="default", version=VERSION, description=""),
|
76 |
-
]
|
77 |
-
|
78 |
-
|
79 |
-
def _info(self):
|
80 |
-
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|
81 |
-
features = datasets.Features(
|
82 |
-
{
|
83 |
-
"text": datasets.Value("string"),
|
84 |
-
"meta": datasets.Value("string")
|
85 |
-
# These are the features of your dataset like images, labels ...
|
86 |
-
}
|
87 |
-
)
|
88 |
-
return datasets.DatasetInfo(
|
89 |
-
# This is the description that will appear on the datasets page.
|
90 |
-
description=_DESCRIPTION,
|
91 |
-
# This defines the different columns of the dataset and their types
|
92 |
-
features=features, # Here we define them above because they are different between the two configurations
|
93 |
-
# If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
|
94 |
-
# specify them. They'll be used if as_supervised=True in builder.as_dataset.
|
95 |
-
# supervised_keys=("sentence", "label"),
|
96 |
-
# Homepage of the dataset for documentation
|
97 |
-
homepage=_HOMEPAGE,
|
98 |
-
# License for the dataset if available
|
99 |
-
license=_LICENSE,
|
100 |
-
# Citation for the dataset
|
101 |
-
citation=_CITATION,
|
102 |
-
)
|
103 |
-
|
104 |
-
def _split_generators(self, dl_manager):
|
105 |
-
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
|
106 |
-
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
|
107 |
-
|
108 |
-
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
109 |
-
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
110 |
-
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
111 |
-
|
112 |
-
train_files = [dl_manager.download_and_extract(f"train/proofpile_train_{i}.jsonl.gz") for i in range(8)]
|
113 |
-
val_files = [dl_manager.download_and_extract("dev/proofpile_dev.jsonl.gz")]
|
114 |
-
test_files = [dl_manager.download_and_extract("test/proofpile_test.jsonl.gz")]
|
115 |
-
|
116 |
-
return [
|
117 |
-
datasets.SplitGenerator(
|
118 |
-
name=datasets.Split.TRAIN,
|
119 |
-
# These kwargs will be passed to _generate_examples
|
120 |
-
gen_kwargs={
|
121 |
-
"data_files": train_files,
|
122 |
-
},
|
123 |
-
),
|
124 |
-
datasets.SplitGenerator(
|
125 |
-
name=datasets.Split.VALIDATION,
|
126 |
-
# These kwargs will be passed to _generate_examples
|
127 |
-
gen_kwargs={
|
128 |
-
"data_files": val_files,
|
129 |
-
},
|
130 |
-
),
|
131 |
-
datasets.SplitGenerator(
|
132 |
-
name=datasets.Split.TEST,
|
133 |
-
gen_kwargs={
|
134 |
-
"data_files": test_files,
|
135 |
-
},
|
136 |
-
),
|
137 |
-
]
|
138 |
-
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
139 |
-
def _generate_examples(self, data_files):
|
140 |
-
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
141 |
-
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
142 |
-
key = 0
|
143 |
-
for name in data_files:
|
144 |
-
with open(name) as f:
|
145 |
-
instances = ndjson.load(f)
|
146 |
-
for instance in instances:
|
147 |
-
yield key, {"text": instance["text"],
|
148 |
-
"meta": json.dumps(instance["meta"])}
|
149 |
-
key += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/proofpile_test.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:3de76bef2067cd06de681bf7bc8391cfd46cff7c964aea4b8be22002881a2cff
|
3 |
-
size 138257828
|
|
|
|
|
|
|
|
train/proofpile_train_0.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:ebd551043986f06477bee3af11d0d57180e9e440c3c9d8be0a378ace984ca525
|
3 |
-
size 1245144003
|
|
|
|
|
|
|
|
train/proofpile_train_1.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:1b90e03d1dc1df325985af452aa5abc69b5e211adf855914a375c72f1e691153
|
3 |
-
size 1248678238
|
|
|
|
|
|
|
|
train/proofpile_train_2.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:4ce123e250490a8b86b1df06a871d3f12513d8731d468fcd6443d8b25f358f0c
|
3 |
-
size 1248942967
|
|
|
|
|
|
|
|
train/proofpile_train_3.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:535055dbdc6a0e629d7de6a2a8d4b61d86410f1d939fdba773621fc01c5e8f66
|
3 |
-
size 1254135740
|
|
|
|
|
|
|
|
train/proofpile_train_4.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:4ab7d1b0c2c158622da7b2c4f24233b9d225d4fc8113099eefa1abc0fbcf68f0
|
3 |
-
size 1243365834
|
|
|
|
|
|
|
|
train/proofpile_train_5.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e58deabc3bf0e47c5e49b5e6a8f42d4f3ab467a3f4cb5d05114004e78324c67b
|
3 |
-
size 1271854185
|
|
|
|
|
|
|
|
train/proofpile_train_6.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:d0b301a389f8f050f05485d28d45e62a3cfd838dbc2f044f8cf0eb3da4da2813
|
3 |
-
size 1233941494
|
|
|
|
|
|
|
|
train/proofpile_train_7.jsonl.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:110db34dfd1878ab9c7f67c14532fb90cf41c72182c2563e39c9ff42384f31da
|
3 |
-
size 1005422313
|
|
|
|
|
|
|
|