Convert dataset to Parquet

#1
by SaylorTwift HF Staff - opened
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ - config_name: induction
4
+ features:
5
+ - name: source
6
+ dtype: string
7
+ - name: target
8
+ dtype: string
9
+ splits:
10
+ - name: train
11
+ num_bytes: 98736
12
+ num_examples: 1000
13
+ - name: test
14
+ num_bytes: 490070
15
+ num_examples: 5000
16
+ - name: validation
17
+ num_bytes: 491609
18
+ num_examples: 5000
19
+ download_size: 370911
20
+ dataset_size: 1080415
21
+ - config_name: pattern_match
22
+ features:
23
+ - name: source
24
+ dtype: string
25
+ - name: target
26
+ dtype: string
27
+ splits:
28
+ - name: train
29
+ num_bytes: 106013
30
+ num_examples: 1000
31
+ - name: test
32
+ num_bytes: 528103
33
+ num_examples: 5000
34
+ - name: validation
35
+ num_bytes: 529021
36
+ num_examples: 5000
37
+ download_size: 487956
38
+ dataset_size: 1163137
39
+ - config_name: variable_substitution
40
+ features:
41
+ - name: source
42
+ dtype: string
43
+ - name: target
44
+ dtype: string
45
+ splits:
46
+ - name: train
47
+ num_bytes: 109442
48
+ num_examples: 1000
49
+ - name: test
50
+ num_bytes: 542676
51
+ num_examples: 5000
52
+ - name: validation
53
+ num_bytes: 545317
54
+ num_examples: 5000
55
+ download_size: 390138
56
+ dataset_size: 1197435
57
+ configs:
58
+ - config_name: induction
59
+ data_files:
60
+ - split: train
61
+ path: induction/train-*
62
+ - split: test
63
+ path: induction/test-*
64
+ - split: validation
65
+ path: induction/validation-*
66
+ - config_name: pattern_match
67
+ data_files:
68
+ - split: train
69
+ path: pattern_match/train-*
70
+ - split: test
71
+ path: pattern_match/test-*
72
+ - split: validation
73
+ path: pattern_match/validation-*
74
+ - config_name: variable_substitution
75
+ data_files:
76
+ - split: train
77
+ path: variable_substitution/train-*
78
+ - split: test
79
+ path: variable_substitution/test-*
80
+ - split: validation
81
+ path: variable_substitution/validation-*
82
+ ---
induction/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccef06a6590fc25e7072d05733e60da2c69ef136865da26e022e1e1498d7d2ed
3
+ size 168102
induction/test.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
induction/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62acb7417ec9c9b484f16893a835a074a7ae0c14a27447e4b48b26f1cd606c40
3
+ size 34367
induction/train.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
induction/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec2c0d0c7fb86dbcace2773223fa3827505bd471e87729078aa8cf5815134dac
3
+ size 168442
induction/validation.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
pattern_match/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c0936368b279c53e6d68376190a98758e26623af4e772f659d619dfbe319d1b
3
+ size 221423
pattern_match/test.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
pattern_match/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3197de805e7ce8171afcd3a8bb229f5d90667cbf9aeac01baa90e8c1edf39dd7
3
+ size 44923
pattern_match/train.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
pattern_match/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30ca38979dc948a470d9f7d13657e8db353c71cfc9c0dc27d1e3805243e3ff6a
3
+ size 221610
pattern_match/validation.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
synthetic_reasoning.py DELETED
@@ -1,61 +0,0 @@
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-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12d2cbc04e70da6f730b607725a491d5ea96e4c6998e330b13ee026c8d75cf09
3
+ size 176740
variable_substitution/test.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
variable_substitution/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ec32adeacd978794bebbdfc832e9eada8cc34c63c09ed978bdebaa29e0deaea
3
+ size 36250
variable_substitution/train.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
variable_substitution/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11fb0ef6ba8873942b621e69686b31d39f9e6a4fe29278d07c2312bec9118e6e
3
+ size 177148
variable_substitution/validation.jsonl DELETED
The diff for this file is too large to render. See raw diff