Upload 15 files
Browse files- .gitattributes +1 -0
- olympic_test.py +90 -0
- test/Astronomy.json +0 -0
- test/Biology.json +0 -0
- test/CS.json +0 -0
- test/Chemistry.json +0 -0
- test/Geography.json +0 -0
- test/Math.json +0 -0
- test/Physics.json +0 -0
- val/Astronomy.json +0 -0
- val/Biology.json +0 -0
- val/CS.json +3 -0
- val/Chemistry.json +0 -0
- val/Geography.json +0 -0
- val/Math.json +0 -0
- val/Physics.json +0 -0
.gitattributes
CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
val/CS.json filter=lfs diff=lfs merge=lfs -text
|
olympic_test.py
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import datasets
|
3 |
+
import json
|
4 |
+
|
5 |
+
|
6 |
+
_CITATION = """\
|
7 |
+
"""
|
8 |
+
|
9 |
+
_DESCRIPTION = """\
|
10 |
+
OlympicArena
|
11 |
+
"""
|
12 |
+
|
13 |
+
_HOMEPAGE = ""
|
14 |
+
|
15 |
+
_URL = ""
|
16 |
+
|
17 |
+
|
18 |
+
subject_list = ["Math", "Physics", "Chemistry", "Biology", "Geography", "Astronomy", "CS"]
|
19 |
+
|
20 |
+
|
21 |
+
class OlympicArenaConfig(datasets.BuilderConfig):
|
22 |
+
"""BuilderConfig"""
|
23 |
+
|
24 |
+
def __init__(self, **kwargs):
|
25 |
+
"""BuilderConfig
|
26 |
+
Args:
|
27 |
+
**kwargs: keyword arguments forwarded to super.
|
28 |
+
"""
|
29 |
+
super(OlympicArenaConfig, self).__init__(**kwargs)
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
class OlympicArena(datasets.GeneratorBasedBuilder):
|
34 |
+
BUILDER_CONFIGS = [
|
35 |
+
OlympicArenaConfig(name=subject) for subject in subject_list
|
36 |
+
]
|
37 |
+
|
38 |
+
def _info(self):
|
39 |
+
features = datasets.Features(
|
40 |
+
{
|
41 |
+
"id": datasets.Value("string"),
|
42 |
+
"problem": datasets.Value("string"),
|
43 |
+
"prompt": datasets.Value("string"),
|
44 |
+
"figure_urls": datasets.Sequence(datasets.Value("string")),
|
45 |
+
"answer": datasets.Sequence(datasets.Value("string")),
|
46 |
+
"solution": datasets.Value("string"),
|
47 |
+
"answer_type": datasets.Value("string"),
|
48 |
+
"unit": datasets.Sequence(datasets.Value("string")),
|
49 |
+
"answer_sequence": datasets.Sequence(datasets.Value("string")),
|
50 |
+
"type_sequence": datasets.Sequence(datasets.Value("string")),
|
51 |
+
"test_cases": datasets.Sequence(
|
52 |
+
{
|
53 |
+
"input": datasets.Value("string"),
|
54 |
+
"output": datasets.Value("string")
|
55 |
+
}
|
56 |
+
),
|
57 |
+
"subject": datasets.Value("string"),
|
58 |
+
"language": datasets.Value("string"),
|
59 |
+
"modality": datasets.Value("string")
|
60 |
+
}
|
61 |
+
)
|
62 |
+
return datasets.DatasetInfo(
|
63 |
+
description=_DESCRIPTION,
|
64 |
+
features=features,
|
65 |
+
homepage=_HOMEPAGE,
|
66 |
+
citation=_CITATION,
|
67 |
+
)
|
68 |
+
|
69 |
+
def _split_generators(self, dl_manager):
|
70 |
+
subject = self.config.name
|
71 |
+
return [
|
72 |
+
datasets.SplitGenerator(
|
73 |
+
name=datasets.Split.TEST,
|
74 |
+
gen_kwargs={
|
75 |
+
"filepath": dl_manager.download(os.path.join("test", subject+".json")),
|
76 |
+
},
|
77 |
+
),
|
78 |
+
datasets.SplitGenerator(
|
79 |
+
name=datasets.Split("val"),
|
80 |
+
gen_kwargs={
|
81 |
+
"filepath": dl_manager.download(os.path.join("val", subject+".json")),
|
82 |
+
},
|
83 |
+
),
|
84 |
+
]
|
85 |
+
|
86 |
+
def _generate_examples(self, filepath):
|
87 |
+
with open(filepath, "r") as f:
|
88 |
+
data = json.load(f)
|
89 |
+
for i, instance in enumerate(data):
|
90 |
+
yield i, instance
|
test/Astronomy.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test/Biology.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test/CS.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test/Chemistry.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test/Geography.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test/Math.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test/Physics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
val/Astronomy.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
val/Biology.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
val/CS.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f816221f751383fb7e9c5225c5350b8547bb6eadcf79bf073ffee1ae7a1ad80c
|
3 |
+
size 517636118
|
val/Chemistry.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
val/Geography.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
val/Math.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
val/Physics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|