Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
n<1K
Source Datasets:
original
ArXiv:
Tags:
code-generation
License:

Fix Checksum Mismatch

#1
by stadlerb - opened
README.md CHANGED
@@ -11,97 +11,15 @@ license:
11
  - cc-by-4.0
12
  multilinguality:
13
  - monolingual
 
14
  size_categories:
15
  - n<1K
16
  source_datasets:
17
  - original
18
  task_categories:
19
  - text2text-generation
20
- task_ids: []
21
- pretty_name: Mostly Basic Python Problems
22
- tags:
23
- - code-generation
24
- dataset_info:
25
- - config_name: full
26
- features:
27
- - name: task_id
28
- dtype: int32
29
- - name: text
30
- dtype: string
31
- - name: code
32
- dtype: string
33
- - name: test_list
34
- sequence: string
35
- - name: test_setup_code
36
- dtype: string
37
- - name: challenge_test_list
38
- sequence: string
39
- splits:
40
- - name: train
41
- num_bytes: 176879
42
- num_examples: 374
43
- - name: test
44
- num_bytes: 244104
45
- num_examples: 500
46
- - name: validation
47
- num_bytes: 42405
48
- num_examples: 90
49
- - name: prompt
50
- num_bytes: 4550
51
- num_examples: 10
52
- download_size: 236069
53
- dataset_size: 467938
54
- - config_name: sanitized
55
- features:
56
- - name: source_file
57
- dtype: string
58
- - name: task_id
59
- dtype: int32
60
- - name: prompt
61
- dtype: string
62
- - name: code
63
- dtype: string
64
- - name: test_imports
65
- sequence: string
66
- - name: test_list
67
- sequence: string
68
- splits:
69
- - name: train
70
- num_bytes: 63453
71
- num_examples: 120
72
- - name: test
73
- num_bytes: 132720
74
- num_examples: 257
75
- - name: validation
76
- num_bytes: 20050
77
- num_examples: 43
78
- - name: prompt
79
- num_bytes: 3407
80
- num_examples: 7
81
- download_size: 115422
82
- dataset_size: 219630
83
- configs:
84
- - config_name: full
85
- data_files:
86
- - split: train
87
- path: full/train-*
88
- - split: test
89
- path: full/test-*
90
- - split: validation
91
- path: full/validation-*
92
- - split: prompt
93
- path: full/prompt-*
94
- default: true
95
- - config_name: sanitized
96
- data_files:
97
- - split: train
98
- path: sanitized/train-*
99
- - split: test
100
- path: sanitized/test-*
101
- - split: validation
102
- path: sanitized/validation-*
103
- - split: prompt
104
- path: sanitized/prompt-*
105
  ---
106
 
107
  # Dataset Card for Mostly Basic Python Problems (mbpp)
@@ -212,14 +130,7 @@ DatasetDict({
212
  - `challenge_test_list`: list of more challenging test to further probe solution
213
 
214
  ### Data Splits
215
- There are two version of the dataset (full and sanitized), each with four splits:
216
- - train
217
- - evaluation
218
- - test
219
- - prompt
220
-
221
- The `prompt` split corresponds to samples used for few-shot prompting and not for training.
222
-
223
  ## Dataset Creation
224
  See section 2.1 of original [paper](https://arxiv.org/abs/2108.07732).
225
 
@@ -273,4 +184,5 @@ CC-BY-4.0
273
  year={2021}
274
  ```
275
  ### Contributions
276
- Thanks to [@lvwerra](https://github.com/lvwerra) for adding this dataset.
 
 
11
  - cc-by-4.0
12
  multilinguality:
13
  - monolingual
14
+ pretty_name: Mostly Basic Python Problems
15
  size_categories:
16
  - n<1K
17
  source_datasets:
18
  - original
19
  task_categories:
20
  - text2text-generation
21
+ task_ids:
22
+ - text2text-generation-other-code-generation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ---
24
 
25
  # Dataset Card for Mostly Basic Python Problems (mbpp)
 
130
  - `challenge_test_list`: list of more challenging test to further probe solution
131
 
132
  ### Data Splits
133
+ There are two version of the dataset (full and sanitized) which only one split each (test).
 
 
 
 
 
 
 
134
  ## Dataset Creation
135
  See section 2.1 of original [paper](https://arxiv.org/abs/2108.07732).
136
 
 
184
  year={2021}
185
  ```
186
  ### Contributions
187
+ Thanks to [@lvwerra](https://github.com/lvwerra) for adding this dataset.
188
+
dataset_infos.json ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "full": {
3
+ "description": "The MBPP (Mostly Basic Python Problems) dataset consists of around 1,000 crowd-sourced Python\nprogramming problems, designed to be solvable by entry level programmers, covering programming\nfundamentals, standard library functionality, and so on. Each problem consists of a task\ndescription, code solution and 3 automated test cases.\n",
4
+ "citation": "@article{austin2021program,\n title={Program Synthesis with Large Language Models},\n author={Austin, Jacob and Odena, Augustus and Nye, Maxwell and Bosma, Maarten and Michalewski, Henryk and Dohan, David and Jiang, Ellen and Cai, Carrie and Terry, Michael and Le, Quoc and others},\n journal={arXiv preprint arXiv:2108.07732},\n year={2021}\n}",
5
+ "homepage": "https://github.com/google-research/google-research/tree/master/mbpp",
6
+ "license": "CC-BY-4.0",
7
+ "features": {
8
+ "task_id": {
9
+ "dtype": "int32",
10
+ "id": null,
11
+ "_type": "Value"
12
+ },
13
+ "text": {
14
+ "dtype": "string",
15
+ "id": null,
16
+ "_type": "Value"
17
+ },
18
+ "code": {
19
+ "dtype": "string",
20
+ "id": null,
21
+ "_type": "Value"
22
+ },
23
+ "test_list": {
24
+ "feature": {
25
+ "dtype": "string",
26
+ "id": null,
27
+ "_type": "Value"
28
+ },
29
+ "length": -1,
30
+ "id": null,
31
+ "_type": "Sequence"
32
+ },
33
+ "test_setup_code": {
34
+ "dtype": "string",
35
+ "id": null,
36
+ "_type": "Value"
37
+ },
38
+ "challenge_test_list": {
39
+ "feature": {
40
+ "dtype": "string",
41
+ "id": null,
42
+ "_type": "Value"
43
+ },
44
+ "length": -1,
45
+ "id": null,
46
+ "_type": "Sequence"
47
+ }
48
+ },
49
+ "post_processed": null,
50
+ "supervised_keys": null,
51
+ "task_templates": null,
52
+ "builder_name": "mbpp",
53
+ "config_name": "full",
54
+ "version": {
55
+ "version_str": "1.0.0",
56
+ "description": null,
57
+ "major": 1,
58
+ "minor": 0,
59
+ "patch": 0
60
+ },
61
+ "splits": {
62
+ "test": {
63
+ "name": "test",
64
+ "num_bytes": 467780,
65
+ "num_examples": 974,
66
+ "dataset_name": "mbpp"
67
+ }
68
+ },
69
+ "download_checksums": {
70
+ "https://raw.githubusercontent.com/google-research/google-research/master/mbpp/mbpp.jsonl": {
71
+ "num_bytes": 563537,
72
+ "checksum": "0b7004a79cd62d9ec7ecdd5a6e5f0ef1210ff00b286df3c5d5b57bf38c58e19a"
73
+ }
74
+ },
75
+ "download_size": 563537,
76
+ "post_processing_size": null,
77
+ "dataset_size": 467780,
78
+ "size_in_bytes": 1031317
79
+ },
80
+ "sanitized": {
81
+ "description": "The MBPP (Mostly Basic Python Problems) dataset consists of around 1,000 crowd-sourced Python\nprogramming problems, designed to be solvable by entry level programmers, covering programming\nfundamentals, standard library functionality, and so on. Each problem consists of a task\ndescription, code solution and 3 automated test cases.\n",
82
+ "citation": "@article{austin2021program,\n title={Program Synthesis with Large Language Models},\n author={Austin, Jacob and Odena, Augustus and Nye, Maxwell and Bosma, Maarten and Michalewski, Henryk and Dohan, David and Jiang, Ellen and Cai, Carrie and Terry, Michael and Le, Quoc and others},\n journal={arXiv preprint arXiv:2108.07732},\n year={2021}\n}",
83
+ "homepage": "https://github.com/google-research/google-research/tree/master/mbpp",
84
+ "license": "CC-BY-4.0",
85
+ "features": {
86
+ "source_file": {
87
+ "dtype": "string",
88
+ "id": null,
89
+ "_type": "Value"
90
+ },
91
+ "task_id": {
92
+ "dtype": "int32",
93
+ "id": null,
94
+ "_type": "Value"
95
+ },
96
+ "prompt": {
97
+ "dtype": "string",
98
+ "id": null,
99
+ "_type": "Value"
100
+ },
101
+ "code": {
102
+ "dtype": "string",
103
+ "id": null,
104
+ "_type": "Value"
105
+ },
106
+ "test_imports": {
107
+ "feature": {
108
+ "dtype": "string",
109
+ "id": null,
110
+ "_type": "Value"
111
+ },
112
+ "length": -1,
113
+ "id": null,
114
+ "_type": "Sequence"
115
+ },
116
+ "test_list": {
117
+ "feature": {
118
+ "dtype": "string",
119
+ "id": null,
120
+ "_type": "Value"
121
+ },
122
+ "length": -1,
123
+ "id": null,
124
+ "_type": "Sequence"
125
+ }
126
+ },
127
+ "post_processed": null,
128
+ "supervised_keys": null,
129
+ "task_templates": null,
130
+ "builder_name": "mbpp",
131
+ "config_name": "sanitized",
132
+ "version": {
133
+ "version_str": "1.0.0",
134
+ "description": null,
135
+ "major": 1,
136
+ "minor": 0,
137
+ "patch": 0
138
+ },
139
+ "splits": {
140
+ "test": {
141
+ "name": "test",
142
+ "num_bytes": 219504,
143
+ "num_examples": 427,
144
+ "dataset_name": "mbpp"
145
+ }
146
+ },
147
+ "download_checksums": {
148
+ "https://raw.githubusercontent.com/google-research/google-research/master/mbpp/sanitized-mbpp.json": {
149
+ "num_bytes": 254879,
150
+ "checksum": "45fca2bbec0d898702499193e593e9bf92092dd4560ebd7c652b9c84d6aed9f5"
151
+ }
152
+ },
153
+ "download_size": 254879,
154
+ "post_processing_size": null,
155
+ "dataset_size": 219504,
156
+ "size_in_bytes": 474383
157
+ }
158
+ }
full/prompt-00000-of-00001.parquet → dummy/full/1.0.0/dummy_data.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a053e4bb85ceb77430ae80592addb4ca4dc6ba087592f9e04537800ee88b7431
3
- size 7878
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d16a749bc09bd271e4dec24ddbdddce349a10a1f5ea9fefd0fc9754666ac2ddb
3
+ size 1199
sanitized/prompt-00000-of-00001.parquet → dummy/sanitized/1.0.0/dummy_data.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:73c623309b7b5d65fd5661204b35f779f8e66301aa9832d1ad4b8fc3b21151fd
3
- size 6717
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebe542482f95875478695c5dcfc578b161f2e9aea08788c4d917fa0eea4ee344
3
+ size 1191
full/test-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:566fd53060ffba5766dace1d1e2f4c38906781526de222b0dfbdbc325b696c77
3
- size 115824
 
 
 
 
full/train-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:09d125ca31edacb7800be8c67c45abff618faf0214ff551291817d06bdb914ae
3
- size 87223
 
 
 
 
full/validation-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f0ec060987432d99fe8fb409d31e6c67445b208a01741c5583517c80a10fe80
3
- size 25144
 
 
 
 
mbpp.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ import datasets
4
+
5
+
6
+ _DESCRIPTION = """\
7
+ The MBPP (Mostly Basic Python Problems) dataset consists of around 1,000 crowd-sourced Python
8
+ programming problems, designed to be solvable by entry level programmers, covering programming
9
+ fundamentals, standard library functionality, and so on. Each problem consists of a task
10
+ description, code solution and 3 automated test cases.
11
+ """
12
+
13
+ _URLs = {
14
+ "full": "https://raw.githubusercontent.com/google-research/google-research/master/mbpp/mbpp.jsonl",
15
+ "sanitized": "https://raw.githubusercontent.com/google-research/google-research/master/mbpp/sanitized-mbpp.json",
16
+ }
17
+
18
+ _SPLITS = ["full", "sanitized"]
19
+
20
+ _CITATION = """\
21
+ @article{austin2021program,
22
+ title={Program Synthesis with Large Language Models},
23
+ author={Austin, Jacob and Odena, Augustus and Nye, Maxwell and Bosma, Maarten and Michalewski, Henryk and Dohan, David and Jiang, Ellen and Cai, Carrie and Terry, Michael and Le, Quoc and others},
24
+ journal={arXiv preprint arXiv:2108.07732},
25
+ year={2021}
26
+ }"""
27
+
28
+ _HOMEPAGE = "https://github.com/google-research/google-research/tree/master/mbpp"
29
+
30
+ _LICENSE = "CC-BY-4.0"
31
+
32
+
33
+ class MBPP(datasets.GeneratorBasedBuilder):
34
+ """MBPP: Mostly Basic Python Problems Dataset"""
35
+
36
+ VERSION = datasets.Version("1.0.0")
37
+
38
+ BUILDER_CONFIGS = [
39
+ datasets.BuilderConfig(
40
+ name=f"{split}",
41
+ version=datasets.Version("1.0.0"),
42
+ description=_DESCRIPTION,
43
+ )
44
+ for split in _SPLITS
45
+ ]
46
+
47
+ DEFAULT_CONFIG_NAME = "full"
48
+
49
+ def _info(self):
50
+ if self.config.name == "full":
51
+ features = datasets.Features(
52
+ {
53
+ "task_id": datasets.Value("int32"),
54
+ "text": datasets.Value("string"),
55
+ "code": datasets.Value("string"),
56
+ "test_list": datasets.Sequence(datasets.Value("string")),
57
+ "test_setup_code": datasets.Value("string"),
58
+ "challenge_test_list": datasets.Sequence(datasets.Value("string")),
59
+ }
60
+ )
61
+ else:
62
+ features = datasets.Features(
63
+ {
64
+ "source_file": datasets.Value("string"),
65
+ "task_id": datasets.Value("int32"),
66
+ "prompt": datasets.Value("string"),
67
+ "code": datasets.Value("string"),
68
+ "test_imports": datasets.Sequence(datasets.Value("string")),
69
+ "test_list": datasets.Sequence(datasets.Value("string")),
70
+ }
71
+ )
72
+ return datasets.DatasetInfo(
73
+ description=_DESCRIPTION,
74
+ features=features,
75
+ supervised_keys=None,
76
+ homepage=_HOMEPAGE,
77
+ license=_LICENSE,
78
+ citation=_CITATION,
79
+ )
80
+
81
+ def _split_generators(self, dl_manager):
82
+ """Returns SplitGenerators."""
83
+ config_urls = _URLs[self.config.name]
84
+ data_dir = dl_manager.download_and_extract(config_urls)
85
+ return [
86
+ datasets.SplitGenerator(
87
+ name=datasets.Split.TEST,
88
+ gen_kwargs={
89
+ "filepath": data_dir,
90
+ },
91
+ )
92
+ ]
93
+
94
+ def _generate_examples(self, filepath):
95
+ """Yields examples."""
96
+ with open(filepath, encoding="utf-8") as file:
97
+ if self.config.name == "full":
98
+ data = [json.loads(line) for line in file]
99
+ else:
100
+ data = json.load(file)
101
+ id_ = 0
102
+ for sample in data:
103
+ yield id_, sample
104
+ id_ += 1
sanitized/test-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e9e9efa2c0d59ef5e55537a9d126b8f875d5ac010a8d75628d76824884e15850
3
- size 60864
 
 
 
 
sanitized/train-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d95f8ad6d2fff08fe4826122d6e3e31f75716825d0c5c340d297aca5e9e0de0e
3
- size 33854
 
 
 
 
sanitized/validation-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:27e065fcab3c863959933328a7fdbf404e1bcb5464b1be6fe0dcd9530e420204
3
- size 13987