parquet-converter commited on
Commit
357bb4a
·
1 Parent(s): 97fa393

Update parquet files

Browse files
README.md DELETED
@@ -1,179 +0,0 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: task_id
5
- dtype: string
6
- - name: language
7
- dtype: string
8
- - name: prompt
9
- dtype: string
10
- - name: test
11
- dtype: string
12
- - name: entry_point
13
- dtype: string
14
- splits:
15
- - name: multi-humaneval_python
16
- num_bytes: 165716
17
- num_examples: 164
18
- download_size: 67983
19
- dataset_size: 165716
20
- license: apache-2.0
21
- task_categories:
22
- - text-generation
23
- tags:
24
- - mxeval
25
- - code-generation
26
- - multi-humaneval
27
- - humaneval
28
- pretty_name: multi-humaneval
29
- language:
30
- - en
31
- ---
32
- # Multi-HumanEval
33
-
34
- ## Table of Contents
35
- - [multi-humaneval](#multi-humaneval)
36
- - [Table of Contents](#table-of-contents)
37
- - [Dataset Description](#dataset-description)
38
- - [Dataset Summary](#dataset-summary)
39
- - [Supported Tasks and Leaderboards](#related-tasks-and-leaderboards)
40
- - [Languages](#languages)
41
- - [Dataset Structure](#dataset-structure)
42
- - [Data Instances](#data-instances)
43
- - [Data Fields](#data-fields)
44
- - [Data Splits](#data-splits)
45
- - [Dataset Creation](#dataset-creation)
46
- - [Curation Rationale](#curation-rationale)
47
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
48
- - [Considerations for Using the Data](#considerations-for-using-the-data)
49
- - [Social Impact of Dataset](#social-impact-of-dataset)
50
- - [Additional Information](#additional-information)
51
- - [Dataset Curators](#dataset-curators)
52
- - [Licensing Information](#licensing-information)
53
- - [Citation Information](#citation-information)
54
- - [Contributions](#contributions)
55
-
56
- # multi-humaneval
57
-
58
- ## Dataset Description
59
-
60
- - **Repository:** [GitHub Repository](https://github.com/amazon-science/mbxp-exec-eval)
61
- - **Paper:** [Multi-lingual Evaluation of Code Generation Models](https://openreview.net/forum?id=Bo7eeXm6An8)
62
-
63
- ### Dataset Summary
64
-
65
- This repository contains data and code to perform execution-based multi-lingual evaluation of code generation capabilities and the corresponding data,
66
- namely, a multi-lingual benchmark MBXP, multi-lingual MathQA and multi-lingual HumanEval.
67
- <br>Results and findings can be found in the paper ["Multi-lingual Evaluation of Code Generation Models"](https://arxiv.org/abs/2210.14868).
68
-
69
-
70
- ### Related Tasks and Leaderboards
71
- * [Multi-HumanEval](https://huggingface.co/datasets/mxeval/multi-humaneval)
72
- * [MBXP](https://huggingface.co/datasets/mxeval/mbxp)
73
- * [MathQAX](https://huggingface.co/datasets/mxeval/mathqax)
74
-
75
- ### Languages
76
- The programming problems are written in multiple programming languages and contain English natural text in comments and docstrings.
77
-
78
-
79
- ## Dataset Structure
80
- To lookup currently supported datasets
81
- ```python
82
- get_dataset_config_names("mxeval/multi-humaneval")
83
- ['python', 'csharp', 'go', 'java', 'javascript', 'kotlin', 'perl', 'php', 'ruby', 'scala', 'swift', 'typescript']
84
-
85
- ```
86
- To load a specific dataset and language
87
- ```python
88
- from datasets import load_dataset
89
- load_dataset("mxeval/multi-humaneval", "python")
90
- DatasetDict({
91
- test: Dataset({
92
- features: ['task_id', 'language', 'prompt', 'test', 'entry_point', 'canonical_solution', 'description'],
93
- num_rows: 164
94
- })
95
- })
96
- ```
97
-
98
- ### Data Instances
99
-
100
- An example of a dataset instance:
101
-
102
- ```python
103
- {
104
- "task_id": "HumanEval/0",
105
- "language": "python",
106
- "prompt": "from typing import List\n\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\" Check if in given list of numbers, are any two numbers closer to each other than\n given threshold.\n >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n False\n >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n True\n \"\"\"\n",
107
- "test": "\n\nMETADATA = {\n \"author\": \"jt\",\n \"dataset\": \"test\"\n}\n\n\ndef check(candidate):\n assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3) == True\n assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05) == False\n assert candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95) == True\n assert candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.8) == False\n assert candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0], 0.1) == True\n assert candidate([1.1, 2.2, 3.1, 4.1, 5.1], 1.0) == True\n assert candidate([1.1, 2.2, 3.1, 4.1, 5.1], 0.5) == False\n\n",
108
- "entry_point": "has_close_elements",
109
- "canonical_solution": " for idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = abs(elem - elem2)\n if distance < threshold:\n return True\n\n return False\n",
110
- "description": "Check if in given list of numbers, are any two numbers closer to each other than\n given threshold.\n >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n False\n >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n True"
111
- }
112
- ```
113
-
114
- ### Data Fields
115
-
116
- - `task_id`: identifier for the data sample
117
- - `prompt`: input for the model containing function header and docstrings
118
- - `canonical_solution`: solution for the problem in the `prompt`
119
- - `description`: task description
120
- - `test`: contains function to test generated code for correctness
121
- - `entry_point`: entry point for test
122
- - `language`: programming lanuage identifier to call the appropriate subprocess call for program execution
123
-
124
-
125
- ### Data Splits
126
-
127
- - HumanXEval
128
- - Python
129
- - Csharp
130
- - Go
131
- - Java
132
- - Javascript
133
- - Kotlin
134
- - Perl
135
- - Php
136
- - Ruby
137
- - Scala
138
- - Swift
139
- - Typescript
140
-
141
- ## Dataset Creation
142
-
143
- ### Curation Rationale
144
-
145
- Since code generation models are often trained on dumps of GitHub a dataset not included in the dump was necessary to properly evaluate the model. However, since this dataset was published on GitHub it is likely to be included in future dumps.
146
-
147
- ### Personal and Sensitive Information
148
-
149
- None.
150
-
151
- ## Considerations for Using the Data
152
- Make sure to sandbox the execution environment.
153
-
154
- ### Social Impact of Dataset
155
- With this dataset code generating models can be better evaluated which leads to fewer issues introduced when using such models.
156
-
157
- ### Dataset Curators
158
- AWS AI Labs
159
-
160
- ### Licensing Information
161
-
162
- [LICENSE](https://huggingface.co/datasets/mxeval/multi-humaneval/blob/main/multi-humaneval-LICENSE) <br>
163
- [THIRD PARTY LICENSES](https://huggingface.co/datasets/mxeval/multi-humaneval/blob/main/THIRD_PARTY_LICENSES)
164
-
165
- ### Citation Information
166
- ```
167
- @inproceedings{
168
- athiwaratkun2023multilingual,
169
- title={Multi-lingual Evaluation of Code Generation Models},
170
- author={Ben Athiwaratkun and Sanjay Krishna Gouda and Zijian Wang and Xiaopeng Li and Yuchen Tian and Ming Tan and Wasi Uddin Ahmad and Shiqi Wang and Qing Sun and Mingyue Shang and Sujan Kumar Gonugondla and Hantian Ding and Varun Kumar and Nathan Fulton and Arash Farahani and Siddhartha Jain and Robert Giaquinto and Haifeng Qian and Murali Krishna Ramanathan and Ramesh Nallapati and Baishakhi Ray and Parminder Bhatia and Sudipta Sengupta and Dan Roth and Bing Xiang},
171
- booktitle={The Eleventh International Conference on Learning Representations },
172
- year={2023},
173
- url={https://openreview.net/forum?id=Bo7eeXm6An8}
174
- }
175
- ```
176
-
177
- ### Contributions
178
-
179
- [skgouda@](https://github.com/sk-g) [benathi@](https://github.com/benathi)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
THIRD_PARTY_LICENSES DELETED
@@ -1,23 +0,0 @@
1
- The amazon/multi-humaneval repository includes the following third-party software/licensing:
2
-
3
- ** (1) In multi-humaneval, we release Multi-lingual HumanEval where we adapt the HumanEval dataset by OpenAI into multiple datasets in different programming languages. The original code and dataset are from https://github.com/openai/human-eval/tree/master/data.
4
-
5
- The MIT License
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
csharp/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8dd7e5d504bf0fb7bc427fab81b46ea1d2ef8d59859545bd830ad8eee99937f2
3
+ size 143026
go/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b718eec53508c4dff2069072186f78eac1a5e0a75570d2d85a00214ae824d41
3
+ size 131646
java/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:caf20b5ed3681b3c3e8efa5684d0d13d6dfc2ad513b68ace06687234cba2229d
3
+ size 165317
javascript/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c6a66b51acf8b6107f79c5d972c0bdea3df51a8d37c13e7c3df7a76dbceb8f8
3
+ size 129577
kotlin/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:beb61f758be322fb23c6c89e117d9aa9d8ef368b8a796bbdf10e4a86472142d2
3
+ size 148388
multi-humaneval-LICENSE DELETED
@@ -1,198 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
- Copyright [yyyy] [name of copyright owner]
190
- Licensed under the Apache License, Version 2.0 (the "License");
191
- you may not use this file except in compliance with the License.
192
- You may obtain a copy of the License at
193
- http://www.apache.org/licenses/LICENSE-2.0
194
- Unless required by applicable law or agreed to in writing, software
195
- distributed under the License is distributed on an "AS IS" BASIS,
196
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
197
- See the License for the specific language governing permissions and
198
- limitations under the License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
multi-humaneval.py DELETED
@@ -1,128 +0,0 @@
1
- import json
2
- import os
3
- import requests
4
- import datasets
5
-
6
- import os
7
- from collections import defaultdict
8
-
9
- _CITATION = """\
10
- @inproceedings{
11
- athiwaratkun2023multilingual,
12
- title={Multi-lingual Evaluation of Code Generation Models},
13
- author={Ben Athiwaratkun and Sanjay Krishna Gouda and Zijian Wang and Xiaopeng Li and Yuchen Tian and Ming Tan and Wasi Uddin Ahmad and Shiqi Wang and Qing Sun and Mingyue Shang and Sujan Kumar Gonugondla and Hantian Ding and Varun Kumar and Nathan Fulton and Arash Farahani and Siddhartha Jain and Robert Giaquinto and Haifeng Qian and Murali Krishna Ramanathan and Ramesh Nallapati and Baishakhi Ray and Parminder Bhatia and Sudipta Sengupta and Dan Roth and Bing Xiang},
14
- booktitle={The Eleventh International Conference on Learning Representations },
15
- year={2023},
16
- url={https://openreview.net/forum?id=Bo7eeXm6An8}
17
- }"""
18
-
19
- VERSION=f"1.1.0"
20
-
21
- _HOMEPAGE = "https://github.com/amazon-science/mbxp-exec-eval"
22
-
23
- _LICENSE = "Apache License 2.0"
24
-
25
- _DESCRIPTION = """\
26
- A collection of execution-based multi-lingual benchmark for code generation.
27
- """
28
-
29
- _LICENSES = defaultdict(lambda: _LICENSE)
30
- _LICENSES["python"] = "MIT License"
31
-
32
- _CITATIONS = defaultdict(lambda: _CITATION)
33
-
34
- _CITATIONS["python"] = """\
35
- @misc{chen2021evaluating,
36
- title={Evaluating Large Language Models Trained on Code},
37
- author={Mark Chen and Jerry Tworek and Heewoo Jun and Qiming Yuan and Henrique Ponde de Oliveira Pinto and Jared Kaplan and Harri Edwards and Yuri Burda and Nicholas Joseph and Greg Brockman and Alex Ray and Raul Puri and Gretchen Krueger and Michael Petrov and Heidy Khlaaf and Girish Sastry and Pamela Mishkin and Brooke Chan and Scott Gray and Nick Ryder and Mikhail Pavlov and Alethea Power and Lukasz Kaiser and Mohammad Bavarian and Clemens Winter and Philippe Tillet and Felipe Petroski Such and Dave Cummings and Matthias Plappert and Fotios Chantzis and Elizabeth Barnes and Ariel Herbert-Voss and William Hebgen Guss and Alex Nichol and Alex Paino and Nikolas Tezak and Jie Tang and Igor Babuschkin and Suchir Balaji and Shantanu Jain and William Saunders and Christopher Hesse and Andrew N. Carr and Jan Leike and Josh Achiam and Vedant Misra and Evan Morikawa and Alec Radford and Matthew Knight and Miles Brundage and Mira Murati and Katie Mayer and Peter Welinder and Bob McGrew and Dario Amodei and Sam McCandlish and Ilya Sutskever and Wojciech Zaremba},
38
- year={2021},
39
- eprint={2107.03374},
40
- archivePrefix={arXiv},
41
- primaryClass={cs.LG}
42
- }"""
43
-
44
- _GITHUB_ROOT = "https://raw.githubusercontent.com/amazon-science/mbxp-exec-eval/verify_files/data/multilingual_humaneval/"
45
-
46
- metadata_dict_path = requests.get(os.path.join(_GITHUB_ROOT, "metadata.json"))
47
- metadata = json.loads(metadata_dict_path.text)
48
-
49
- class MultiHumanEvalConfig(datasets.BuilderConfig):
50
- """BuilderConfig for MultiHumanEval."""
51
-
52
- def __init__(
53
- self,
54
- language,
55
- data_url,
56
- citation,
57
- version,
58
- **kwargs,
59
- ):
60
- super(MultiHumanEvalConfig, self).__init__(version=datasets.Version(f"{version}", ""), **kwargs)
61
- self.name = language
62
- self.data_url = data_url
63
- self.citation = citation
64
-
65
-
66
- class MultiHumanEval(datasets.GeneratorBasedBuilder):
67
- """MultiHumanEval: An execution-based multi-lingual HumanEval benchmark for code generation."""
68
-
69
- BUILDER_CONFIGS = [
70
- MultiHumanEvalConfig(
71
- name=f"{language}",
72
- language=f"{language}",
73
- version=VERSION,
74
- citation=_CITATIONS[f"{language}"],
75
- description=f"HumanEval benchmark in {language}",
76
- data_url=os.path.join(_GITHUB_ROOT, language_path)
77
- ) for language, language_path in metadata.items()
78
- ]
79
-
80
- def _info(self):
81
- self.build_name = self.name
82
- features = datasets.Features(
83
- {
84
- "task_id": datasets.Value("string"),
85
- "language": datasets.Value("string"),
86
- "prompt": datasets.Value("string"),
87
- "test": datasets.Value("string"),
88
- "entry_point": datasets.Value("string"),
89
- "canonical_solution": datasets.Value("string"),
90
- "description": datasets.Value("string"),
91
- }
92
- )
93
- return datasets.DatasetInfo(
94
- description=_DESCRIPTION,
95
- features=features,
96
- supervised_keys=None,
97
- homepage=_HOMEPAGE,
98
- license=_LICENSES[self.config.name],
99
- citation=_CITATIONS[self.config.name],
100
- )
101
-
102
-
103
- def _split_generators(
104
- self, dl_manager
105
- ):
106
- """Returns SplitGenerators."""
107
- data_file = dl_manager.download_and_extract(url_or_urls=self.config.data_url)
108
- return [
109
- datasets.SplitGenerator(
110
- name=datasets.Split.TEST,
111
- gen_kwargs={
112
- "filepath": data_file,
113
- },
114
- )
115
- ]
116
-
117
-
118
- def _generate_examples(self, filepath):
119
- """Yields examples."""
120
- with open(filepath) as file:
121
- data = []
122
- for line in file:
123
- jd = json.loads(line)
124
- data.append(jd)
125
- id_ = 0
126
- for sample in data:
127
- yield id_, sample
128
- id_ += 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
perl/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7975ba9095e7c58b944e7fdb8ed3059b5db424d4c51e80b46049e7f194b4333
3
+ size 127619
php/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d01b06a9627b55335f537d6d7eba4f6727b50ab6950d67c4e2d065548b84735e
3
+ size 127554
python/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee64bc1745ccf53666f1141d778f44c8c97abad4d297610761d5150b9ecc91a8
3
+ size 117736
ruby/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1bac4f5ff1ebf5266bce7dd7e0222564e92802f52aa34d337d2ab6cd461283d
3
+ size 121559
scala/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab425e2447d2ee28b489451385ff9ea50007de20114b1ef3f08153d88bc5f5e8
3
+ size 146249
swift/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc9364f483db7bfdccfabd1cc0b9e1cfcbd921793754d3d1ed3c72e2306333f8
3
+ size 141760
typescript/multi-humaneval-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c3f52451c5017cee4bd09a38641742bc34eca849d5b78b19e2c748e29ee22bd
3
+ size 123809