zhangir-azerbayev
commited on
Commit
•
ef64e3a
1
Parent(s):
47834db
works!
Browse files- proofnet.py +18 -4
- test_loader.py +4 -1
proofnet.py
CHANGED
@@ -18,10 +18,25 @@
|
|
18 |
import json
|
19 |
|
20 |
import datasets
|
21 |
-
from datasets.tasks import QuestionAnsweringExtractive
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
logger = datasets.logging.get_logger(__name__)
|
25 |
|
26 |
class ProofNetConfig(datasets.BuilderConfig):
|
27 |
"""BuilderConfig"""
|
@@ -31,7 +46,7 @@ class ProofNetConfig(datasets.BuilderConfig):
|
|
31 |
Args:
|
32 |
**kwargs: keyword arguments forwarded to super.
|
33 |
"""
|
34 |
-
super(
|
35 |
|
36 |
|
37 |
class ProofNet(datasets.GeneratorBasedBuilder):
|
@@ -67,7 +82,6 @@ class ProofNet(datasets.GeneratorBasedBuilder):
|
|
67 |
|
68 |
def _generate_examples(self, filepath):
|
69 |
"""This function returns the examples in the raw (text) form."""
|
70 |
-
logger.info("generating examples from = %s", filepath)
|
71 |
key = 0
|
72 |
with open(filepath, encoding="utf-8") as f:
|
73 |
instances = json.load(f)
|
|
|
18 |
import json
|
19 |
|
20 |
import datasets
|
|
|
21 |
|
22 |
+
# TODO: Add description of the dataset here
|
23 |
+
# You can copy an official description
|
24 |
+
_DESCRIPTION = """\
|
25 |
+
A dataset that evaluates formally proving and autoformalizing undergraduate mathematics.
|
26 |
+
"""
|
27 |
+
|
28 |
+
# TODO: Add a link to an official homepage for the dataset here
|
29 |
+
_HOMEPAGE = ""
|
30 |
+
|
31 |
+
# TODO: Add the licence for the dataset here if you can find it
|
32 |
+
_LICENSE = "MIT"
|
33 |
+
|
34 |
+
# TODO: Add link to the official dataset URLs here
|
35 |
+
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
36 |
+
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
37 |
+
_URLS = {
|
38 |
+
}
|
39 |
|
|
|
40 |
|
41 |
class ProofNetConfig(datasets.BuilderConfig):
|
42 |
"""BuilderConfig"""
|
|
|
46 |
Args:
|
47 |
**kwargs: keyword arguments forwarded to super.
|
48 |
"""
|
49 |
+
super(ProofNetConfig, self).__init__(**kwargs)
|
50 |
|
51 |
|
52 |
class ProofNet(datasets.GeneratorBasedBuilder):
|
|
|
82 |
|
83 |
def _generate_examples(self, filepath):
|
84 |
"""This function returns the examples in the raw (text) form."""
|
|
|
85 |
key = 0
|
86 |
with open(filepath, encoding="utf-8") as f:
|
87 |
instances = json.load(f)
|
test_loader.py
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
from datasets import load_dataset
|
2 |
from tqdm import tqdm
|
3 |
|
4 |
-
data = load_dataset("
|
5 |
|
6 |
print(data)
|
7 |
|
|
|
|
|
|
|
8 |
print("looping through data...")
|
9 |
for x in tqdm(data):
|
10 |
pass
|
|
|
1 |
from datasets import load_dataset
|
2 |
from tqdm import tqdm
|
3 |
|
4 |
+
data = load_dataset("proofnet.py")
|
5 |
|
6 |
print(data)
|
7 |
|
8 |
+
print("example instance:")
|
9 |
+
print(data["test"][0])
|
10 |
+
|
11 |
print("looping through data...")
|
12 |
for x in tqdm(data):
|
13 |
pass
|