Datasets:

Languages:
code
ArXiv:
Tags:
code
License:
Muennighoff commited on
Commit
18ffa24
1 Parent(s): 75bd244

Rename humaneval-x-bugs.py to humanevalpack.py

Browse files
humaneval-x-bugs.py → humanevalpack.py RENAMED
@@ -1,32 +1,15 @@
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
- """HumanEval-X-Bugs dataset."""
16
-
17
-
18
  import json
19
- import datasets
20
 
 
21
 
22
 
23
  _DESCRIPTION = """
24
  """
25
 
26
- _HOMEPAGE = "https://github.com/bigcode-project/commits"
27
 
28
  def get_url(name):
29
- url = f"data/{name}/data/humanevalbugs.jsonl"
30
  return url
31
 
32
  def split_generator(dl_manager, name):
@@ -40,7 +23,7 @@ def split_generator(dl_manager, name):
40
  )
41
  ]
42
 
43
- class HumanEvalXBugsConfig(datasets.BuilderConfig):
44
  """BuilderConfig """
45
 
46
  def __init__(self, name, description, features, **kwargs):
@@ -50,47 +33,47 @@ class HumanEvalXBugsConfig(datasets.BuilderConfig):
50
  self.features = features
51
 
52
 
53
- class HumanEvalXBugs(datasets.GeneratorBasedBuilder):
54
  VERSION = datasets.Version("1.0.0")
55
  BUILDER_CONFIGS = [
56
- HumanEvalXBugsConfig(
57
  name="python",
58
- description="Python HumanEvalBugs",
59
  features=[
60
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
61
  ]
62
  ),
63
- HumanEvalXBugsConfig(
64
- name="cpp",
65
- description="C++ HumanEvalBugs",
66
  features=[
67
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
68
  ]
69
- ),
70
- HumanEvalXBugsConfig(
71
- name="go",
72
- description="Go HumanEvalBugs",
73
  features=[
74
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
75
  ]
76
  ),
77
- HumanEvalXBugsConfig(
78
- name="java",
79
- description="Java HumanEvalBugs",
80
  features=[
81
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
82
  ]
83
- ),
84
- HumanEvalXBugsConfig(
85
- name="js",
86
- description="JavaScript HumanEvalBugs",
87
  features=[
88
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
89
  ]
90
- ),
91
- HumanEvalXBugsConfig(
92
  name="rust",
93
- description="JavaScript HumanEvalBugs",
94
  features=[
95
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
96
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import json
 
2
 
3
+ import datasets
4
 
5
 
6
  _DESCRIPTION = """
7
  """
8
 
9
+ _HOMEPAGE = "https://github.com/bigcode-project/octopack"
10
 
11
  def get_url(name):
12
+ url = f"data/{name}/data/humanevalpack.jsonl"
13
  return url
14
 
15
  def split_generator(dl_manager, name):
 
23
  )
24
  ]
25
 
26
+ class HumanEvalPackConfig(datasets.BuilderConfig):
27
  """BuilderConfig """
28
 
29
  def __init__(self, name, description, features, **kwargs):
 
33
  self.features = features
34
 
35
 
36
+ class HumanEvalPack(datasets.GeneratorBasedBuilder):
37
  VERSION = datasets.Version("1.0.0")
38
  BUILDER_CONFIGS = [
39
+ HumanEvalPackConfig(
40
  name="python",
41
+ description="Python HumanEvalPack",
42
  features=[
43
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
44
  ]
45
  ),
46
+ HumanEvalPackConfig(
47
+ name="js",
48
+ description="JavaScript HumanEvalPack",
49
  features=[
50
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
51
  ]
52
+ ),
53
+ HumanEvalPackConfig(
54
+ name="java",
55
+ description="Java HumanEvalPack",
56
  features=[
57
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
58
  ]
59
  ),
60
+ HumanEvalPackConfig(
61
+ name="go",
62
+ description="Go HumanEvalPack",
63
  features=[
64
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
65
  ]
66
+ ),
67
+ HumanEvalPackConfig(
68
+ name="cpp",
69
+ description="C++ HumanEvalPack",
70
  features=[
71
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
72
  ]
73
+ ),
74
+ HumanEvalPackConfig(
75
  name="rust",
76
+ description="Rust HumanEvalPack",
77
  features=[
78
  "task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "test_setup", "example_test", "bug_type", "failure_symptoms", "entry_point", "signature", "docstring", "instruction"
79
  ]