Clémentine
commited on
Commit
•
da97b7d
1
Parent(s):
b91b2b0
init
Browse files- induction/test.jsonl +0 -0
- induction/train.jsonl +0 -0
- induction/validation.jsonl +0 -0
- pattern_match/test.jsonl +0 -0
- pattern_match/train.jsonl +0 -0
- pattern_match/validation.jsonl +0 -0
- synthetic_reasoning.py +61 -0
- variable_substitution/test.jsonl +0 -0
- variable_substitution/train.jsonl +0 -0
- variable_substitution/validation.jsonl +0 -0
induction/test.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
induction/train.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
induction/validation.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pattern_match/test.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pattern_match/train.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pattern_match/validation.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
synthetic_reasoning.py
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
import os
|
3 |
+
import json
|
4 |
+
|
5 |
+
|
6 |
+
_CITATION = """
|
7 |
+
|
8 |
+
"""
|
9 |
+
|
10 |
+
_DESCRIPTION = """
|
11 |
+
|
12 |
+
"""
|
13 |
+
|
14 |
+
class Builder(datasets.GeneratorBasedBuilder):
|
15 |
+
VERSION = datasets.Version("1.0.0")
|
16 |
+
|
17 |
+
BUILDER_CONFIGS = [
|
18 |
+
datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description=_DESCRIPTION)
|
19 |
+
for name in ["variable_substitution", "pattern_match", "induction"]
|
20 |
+
]
|
21 |
+
|
22 |
+
def _info(self):
|
23 |
+
features = datasets.Features(
|
24 |
+
{
|
25 |
+
"source": datasets.Value("string"),
|
26 |
+
"target": datasets.Value("string"),
|
27 |
+
}
|
28 |
+
)
|
29 |
+
return datasets.DatasetInfo(
|
30 |
+
description=_DESCRIPTION,
|
31 |
+
features=features,
|
32 |
+
homepage="",
|
33 |
+
license="",
|
34 |
+
citation=_CITATION,
|
35 |
+
)
|
36 |
+
|
37 |
+
def _split_generators(self, dl_manager):
|
38 |
+
train_json = dl_manager.download(os.path.join(self.config.name, "train.jsonl"))
|
39 |
+
valid_json = dl_manager.download(os.path.join(self.config.name, "validation.jsonl"))
|
40 |
+
test_json = dl_manager.download(os.path.join(self.config.name, "test.jsonl"))
|
41 |
+
|
42 |
+
return [
|
43 |
+
datasets.SplitGenerator(
|
44 |
+
name=datasets.Split.TRAIN,
|
45 |
+
gen_kwargs={"path": train_json},
|
46 |
+
),
|
47 |
+
datasets.SplitGenerator(
|
48 |
+
name=datasets.Split.TEST,
|
49 |
+
gen_kwargs={"path": test_json},
|
50 |
+
),
|
51 |
+
datasets.SplitGenerator(
|
52 |
+
name=datasets.Split.VALIDATION,
|
53 |
+
gen_kwargs={"path": valid_json},
|
54 |
+
),
|
55 |
+
]
|
56 |
+
|
57 |
+
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
58 |
+
def _generate_examples(self, path):
|
59 |
+
with open(path, encoding="utf-8") as f:
|
60 |
+
for key, row in enumerate(f):
|
61 |
+
yield key, json.loads(row)
|
variable_substitution/test.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
variable_substitution/train.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
variable_substitution/validation.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|