system commited on
Commit
8a0fe0d
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ - expert-generated
7
+ languages:
8
+ - en
9
+ licenses:
10
+ - apache-2-0
11
+ multilinguality:
12
+ - monolingual
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - original
17
+ task_categories:
18
+ - question-answering
19
+ task_ids:
20
+ - multiple-choice-qa
21
+
22
+ ---
23
+
24
+ # Dataset Card for AQUA-RAT
25
+
26
+ ## Table of Contents
27
+ - [Dataset Description](#dataset-description)
28
+ - [Dataset Summary](#dataset-summary)
29
+
30
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
31
+ - [Languages](#languages)
32
+ - [Dataset Structure](#dataset-structure)
33
+ - [Data Instances](#data-instances)
34
+ - [Data Fields](#data-instances)
35
+ - [Data Splits](#data-instances)
36
+ - [Dataset Creation](#dataset-creation)
37
+ - [Curation Rationale](#curation-rationale)
38
+ - [Source Data](#source-data)
39
+ - [Annotations](#annotations)
40
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
41
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
42
+ - [Social Impact of Dataset](#social-impact-of-dataset)
43
+ - [Discussion of Biases](#discussion-of-biases)
44
+ - [Other Known Limitations](#other-known-limitations)
45
+ - [Additional Information](#additional-information)
46
+ - [Dataset Curators](#dataset-curators)
47
+ - [Licensing Information](#licensing-information)
48
+ - [Citation Information](#citation-information)
49
+
50
+ ## Dataset Description
51
+
52
+ - **Homepage:** https://github.com/deepmind/AQuA
53
+ - **Repository:** https://github.com/deepmind/AQuA
54
+ - **Paper:** https://arxiv.org/pdf/1705.04146.pdf
55
+ - **Leaderboard:**
56
+ - **Point of Contact:**
57
+
58
+ ### Dataset Summary
59
+
60
+ A large-scale dataset consisting of approximately 100,000 algebraic word problems.
61
+ The solution to each question is explained step-by-step using natural language.
62
+ This data is used to train a program generation model that learns to generate the explanation,
63
+ while generating the program that solves the question.
64
+
65
+ ### Supported Tasks and Leaderboards
66
+
67
+ ### Languages
68
+
69
+ en
70
+
71
+ ## Dataset Structure
72
+
73
+ ### Data Instances
74
+ ```
75
+ {
76
+ "question": "A grocery sells a bag of ice for $1.25, and makes 20% profit. If it sells 500 bags of ice, how much total profit does it make?",
77
+ "options": ["A)125", "B)150", "C)225", "D)250", "E)275"],
78
+ "rationale": "Profit per bag = 1.25 * 0.20 = 0.25\nTotal profit = 500 * 0.25 = 125\nAnswer is A.",
79
+ "correct": "A"
80
+ }
81
+ ```
82
+
83
+ ### Data Fields
84
+
85
+ - `question` : (str) A natural language definition of the problem to solve
86
+ - `options` : (list(str)) 5 possible options (A, B, C, D and E), among which one is correct
87
+ - `rationale` : (str) A natural language description of the solution to the problem
88
+ - `correct` : (str) The correct option
89
+
90
+ ### Data Splits
91
+ | | Train | Valid | Test |
92
+ | ----- | ------ | ----- | ---- |
93
+ | Examples | 97467 | 254 | 254 |
94
+
95
+ ## Dataset Creation
96
+
97
+ ### Curation Rationale
98
+
99
+
100
+ ### Source Data
101
+
102
+
103
+ #### Initial Data Collection and Normalization
104
+
105
+
106
+ #### Who are the source language producers?
107
+
108
+
109
+ ### Annotations
110
+
111
+ #### Annotation process
112
+
113
+
114
+ #### Who are the annotators?
115
+
116
+
117
+ ### Personal and Sensitive Information
118
+
119
+
120
+ ## Considerations for Using the Data
121
+
122
+
123
+ ### Social Impact of Dataset
124
+
125
+ ### Discussion of Biases
126
+
127
+
128
+ ### Other Known Limitations
129
+
130
+
131
+ ## Additional Information
132
+
133
+
134
+ ### Dataset Curators
135
+
136
+
137
+ ### Licensing Information
138
+ Copyright 2017 Google Inc.
139
+
140
+ Licensed under the Apache License, Version 2.0 (the "License");
141
+ you may not use this file except in compliance with the License.
142
+ You may obtain a copy of the License at
143
+
144
+ http://www.apache.org/licenses/LICENSE-2.0
145
+
146
+ Unless required by applicable law or agreed to in writing, software
147
+ distributed under the License is distributed on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149
+ See the License for the specific language governing permissions and
150
+ limitations under the License.
151
+
152
+ ### Citation Information
153
+ ```
154
+ @article{ling2017program,
155
+ title={Program induction by rationale generation: Learning to solve and explain algebraic word problems},
156
+ author={Ling, Wang and Yogatama, Dani and Dyer, Chris and Blunsom, Phil},
157
+ journal={ACL},
158
+ year={2017}
159
+ }
160
+ ```
aqua_rat.py ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """AQUA-RAT (Algebra Question Answering with Rationales) Dataset"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @InProceedings{ACL,
26
+ title = {Program induction by rationale generation: Learning to solve and explain algebraic word problems},
27
+ authors={Ling, Wang and Yogatama, Dani and Dyer, Chris and Blunsom, Phil},
28
+ year={2017}
29
+ }
30
+ """
31
+
32
+ _DESCRIPTION = """\
33
+ A large-scale dataset consisting of approximately 100,000 algebraic word problems.
34
+ The solution to each question is explained step-by-step using natural language.
35
+ This data is used to train a program generation model that learns to generate the explanation,
36
+ while generating the program that solves the question.
37
+ """
38
+
39
+ _LICENSE = """\
40
+ Copyright 2017 Google Inc.
41
+
42
+ Licensed under the Apache License, Version 2.0 (the "License");
43
+ you may not use this file except in compliance with the License.
44
+ You may obtain a copy of the License at
45
+
46
+ http://www.apache.org/licenses/LICENSE-2.0
47
+
48
+ Unless required by applicable law or agreed to in writing, software
49
+ distributed under the License is distributed on an "AS IS" BASIS,
50
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
+ See the License for the specific language governing permissions and
52
+ limitations under the License.
53
+ """
54
+
55
+ _BASE_URL = "https://raw.githubusercontent.com/deepmind/AQuA/master/"
56
+ _URLs = {
57
+ "raw": {"train": _BASE_URL + "train.json", "dev": _BASE_URL + "dev.json", "test": _BASE_URL + "test.json"},
58
+ "tokenized": {
59
+ "train": _BASE_URL + "train.tok.json",
60
+ "dev": _BASE_URL + "dev.tok.json",
61
+ "test": _BASE_URL + "test.tok.json",
62
+ },
63
+ }
64
+
65
+
66
+ class AquaRat(datasets.GeneratorBasedBuilder):
67
+ """AQUA-RAT (Algebra Question Answering with Rationales) Dataset"""
68
+
69
+ VERSION = datasets.Version("1.0.0")
70
+
71
+ BUILDER_CONFIGS = [
72
+ datasets.BuilderConfig(name="raw", description="Untokenized Dataset"),
73
+ datasets.BuilderConfig(name="tokenized", description="Tokenized Dataset"),
74
+ ]
75
+
76
+ DEFAULT_CONFIG_NAME = "raw"
77
+
78
+ def _info(self):
79
+ features = datasets.Features(
80
+ {
81
+ "question": datasets.Value("string"),
82
+ "options": datasets.features.Sequence(datasets.Value("string")),
83
+ "rationale": datasets.Value("string"),
84
+ "correct": datasets.Value("string"),
85
+ }
86
+ )
87
+ return datasets.DatasetInfo(
88
+ description=_DESCRIPTION,
89
+ features=features,
90
+ supervised_keys=None,
91
+ homepage="https://github.com/deepmind/AQuA",
92
+ license=_LICENSE,
93
+ citation=_CITATION,
94
+ )
95
+
96
+ def _split_generators(self, dl_manager):
97
+ """Returns SplitGenerators."""
98
+ my_urls = _URLs[self.config.name]
99
+ data_paths = dl_manager.download(my_urls)
100
+ return [
101
+ datasets.SplitGenerator(
102
+ name=datasets.Split.TRAIN,
103
+ gen_kwargs={
104
+ "filepath": data_paths["train"],
105
+ "split": "train",
106
+ },
107
+ ),
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.TEST,
110
+ gen_kwargs={"filepath": data_paths["test"], "split": "test"},
111
+ ),
112
+ datasets.SplitGenerator(
113
+ name=datasets.Split.VALIDATION,
114
+ gen_kwargs={
115
+ "filepath": data_paths["dev"],
116
+ "split": "dev",
117
+ },
118
+ ),
119
+ ]
120
+
121
+ def _generate_examples(self, filepath, split):
122
+ """ Yields examples. """
123
+ with open(filepath, encoding="utf-8") as f:
124
+ for id_, row in enumerate(f):
125
+ data = json.loads(row)
126
+ yield id_, {
127
+ "question": data["question"],
128
+ "options": data["options"],
129
+ "rationale": data["rationale"],
130
+ "correct": data["correct"],
131
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"raw": {"description": "A large-scale dataset consisting of approximately 100,000 algebraic word problems. \nThe solution to each question is explained step-by-step using natural language. \nThis data is used to train a program generation model that learns to generate the explanation, \nwhile generating the program that solves the question.\n", "citation": "@InProceedings{ACL,\ntitle = {Program induction by rationale generation: Learning to solve and explain algebraic word problems},\nauthors={Ling, Wang and Yogatama, Dani and Dyer, Chris and Blunsom, Phil},\nyear={2017}\n}\n", "homepage": "https://github.com/deepmind/AQuA", "license": "Copyright 2017 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n", "features": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "options": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "rationale": {"dtype": "string", "id": null, "_type": "Value"}, "correct": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "aqua_rat", "config_name": "raw", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 42333259, "num_examples": 97467, "dataset_name": "aqua_rat"}, "test": {"name": "test", "num_bytes": 116779, "num_examples": 254, "dataset_name": "aqua_rat"}, "validation": {"name": "validation", "num_bytes": 118636, "num_examples": 254, "dataset_name": "aqua_rat"}}, "download_checksums": {"https://raw.githubusercontent.com/deepmind/AQuA/master/train.json": {"num_bytes": 47570935, "checksum": "35b70c7cb1660c34d302bb932dfd3656ce3d05e8c982c797767fec31d7d1e0ba"}, "https://raw.githubusercontent.com/deepmind/AQuA/master/dev.json": {"num_bytes": 132008, "checksum": "4a52301d8a49ae0b286f8e697f9c5da1b109b247b825b47b4c6de34312dceec5"}, "https://raw.githubusercontent.com/deepmind/AQuA/master/test.json": {"num_bytes": 130192, "checksum": "de41581881ef95c5588c44ddc701c77fd480839241dd422a0d181262af24520c"}}, "download_size": 47833135, "post_processing_size": null, "dataset_size": 42568674, "size_in_bytes": 90401809}, "tokenized": {"description": "A large-scale dataset consisting of approximately 100,000 algebraic word problems. \nThe solution to each question is explained step-by-step using natural language. \nThis data is used to train a program generation model that learns to generate the explanation, \nwhile generating the program that solves the question.\n", "citation": "@InProceedings{ACL,\ntitle = {Program induction by rationale generation: Learning to solve and explain algebraic word problems},\nauthors={Ling, Wang and Yogatama, Dani and Dyer, Chris and Blunsom, Phil},\nyear={2017}\n}\n", "homepage": "https://github.com/deepmind/AQuA", "license": "Copyright 2017 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n", "features": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "options": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "rationale": {"dtype": "string", "id": null, "_type": "Value"}, "correct": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "aqua_rat", "config_name": "tokenized", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 46493843, "num_examples": 97467, "dataset_name": "aqua_rat"}, "test": {"name": "test", "num_bytes": 126283, "num_examples": 254, "dataset_name": "aqua_rat"}, "validation": {"name": "validation", "num_bytes": 128873, "num_examples": 254, "dataset_name": "aqua_rat"}}, "download_checksums": {"https://raw.githubusercontent.com/deepmind/AQuA/master/train.tok.json": {"num_bytes": 51721975, "checksum": "5b2fbd7e2216455c7c419bf7e6628d5f3d88a2c96fb412d965b97b85bf96cbab"}, "https://raw.githubusercontent.com/deepmind/AQuA/master/dev.tok.json": {"num_bytes": 142236, "checksum": "16baf52dde06481b0cf92150d6e4caae2d80446138aba0362a30e9254d1b8658"}, "https://raw.githubusercontent.com/deepmind/AQuA/master/test.tok.json": {"num_bytes": 139683, "checksum": "08e0cb7dad55ac0d4ef314c5fd2335e118e21749c4be9cd4ef0e5b27f11630d8"}}, "download_size": 52003894, "post_processing_size": null, "dataset_size": 46748999, "size_in_bytes": 98752893}}
dummy/raw/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:348d6e92949305aba471d35ef9de6cb2ec324cfd387fdf398782d79cacbb52b2
3
+ size 4474
dummy/tokenized/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc92b9bab140c249e049a2348226b34c1eeabbb75a27c1e69fa7dc4672f1f4af
3
+ size 4553