Muennighoff
commited on
Commit
•
48dbcf3
1
Parent(s):
330274d
Update humanevalpack.py
Browse files- humanevalpack.py +13 -13
humanevalpack.py
CHANGED
@@ -40,42 +40,42 @@ class HumanEvalPack(datasets.GeneratorBasedBuilder):
|
|
40 |
name="python",
|
41 |
description="Python HumanEvalPack",
|
42 |
features=[
|
43 |
-
"task_id", "prompt", "
|
44 |
]
|
45 |
),
|
46 |
HumanEvalPackConfig(
|
47 |
name="js",
|
48 |
description="JavaScript HumanEvalPack",
|
49 |
features=[
|
50 |
-
"task_id", "prompt", "
|
51 |
]
|
52 |
),
|
53 |
HumanEvalPackConfig(
|
54 |
name="java",
|
55 |
description="Java HumanEvalPack",
|
56 |
features=[
|
57 |
-
"task_id", "prompt", "
|
58 |
]
|
59 |
),
|
60 |
HumanEvalPackConfig(
|
61 |
name="go",
|
62 |
description="Go HumanEvalPack",
|
63 |
features=[
|
64 |
-
"task_id", "prompt", "
|
65 |
]
|
66 |
),
|
67 |
HumanEvalPackConfig(
|
68 |
name="cpp",
|
69 |
description="C++ HumanEvalPack",
|
70 |
features=[
|
71 |
-
"task_id", "prompt", "
|
72 |
]
|
73 |
),
|
74 |
HumanEvalPackConfig(
|
75 |
name="rust",
|
76 |
description="Rust HumanEvalPack",
|
77 |
features=[
|
78 |
-
"task_id", "prompt", "
|
79 |
]
|
80 |
),
|
81 |
]
|
@@ -87,16 +87,16 @@ class HumanEvalPack(datasets.GeneratorBasedBuilder):
|
|
87 |
features=datasets.Features(
|
88 |
{
|
89 |
"task_id": datasets.Value("string"),
|
90 |
-
"prompt": datasets.Value("string"),
|
91 |
-
"import": datasets.Value("string"),
|
92 |
"declaration": datasets.Value("string"),
|
93 |
"canonical_solution": datasets.Value("string"),
|
94 |
"buggy_solution": datasets.Value("string"),
|
95 |
"bug_type": datasets.Value("string"),
|
96 |
"failure_symptoms": datasets.Value("string"),
|
97 |
"entry_point": datasets.Value("string"),
|
98 |
-
"
|
99 |
"test_setup": datasets.Value("string"),
|
|
|
100 |
"example_test": datasets.Value("string"),
|
101 |
"signature": datasets.Value("string"),
|
102 |
"docstring": datasets.Value("string"),
|
@@ -134,16 +134,16 @@ class HumanEvalPack(datasets.GeneratorBasedBuilder):
|
|
134 |
yield key, {
|
135 |
"task_id": row["task_id"],
|
136 |
"prompt": row["prompt"],
|
137 |
-
"import": row.get("import", ""), # Only for Go
|
138 |
"declaration": row["declaration"],
|
139 |
-
"buggy_solution": row["buggy_solution"],
|
140 |
"canonical_solution": row["canonical_solution"],
|
|
|
141 |
"bug_type": row["bug_type"],
|
142 |
"failure_symptoms": row["failure_symptoms"],
|
143 |
-
"
|
144 |
-
"test": row["test"],
|
145 |
"test_setup": row.get("test_setup", ""), # Only for Go
|
|
|
146 |
"example_test": row["example_test"],
|
|
|
147 |
"signature": row["signature"],
|
148 |
"docstring": row["docstring"],
|
149 |
"instruction": row["instruction"],
|
|
|
40 |
name="python",
|
41 |
description="Python HumanEvalPack",
|
42 |
features=[
|
43 |
+
"task_id", "prompt", "declaration", "canonical_solution", "buggy_solution", "bug_type", "failure_symptoms", "import", "test_setup", "test", "example_test", "entry_point", "signature", "docstring", "instruction"
|
44 |
]
|
45 |
),
|
46 |
HumanEvalPackConfig(
|
47 |
name="js",
|
48 |
description="JavaScript HumanEvalPack",
|
49 |
features=[
|
50 |
+
"task_id", "prompt", "declaration", "canonical_solution", "buggy_solution", "bug_type", "failure_symptoms", "import", "test_setup", "test", "example_test", "entry_point", "signature", "docstring", "instruction"
|
51 |
]
|
52 |
),
|
53 |
HumanEvalPackConfig(
|
54 |
name="java",
|
55 |
description="Java HumanEvalPack",
|
56 |
features=[
|
57 |
+
"task_id", "prompt", "declaration", "canonical_solution", "buggy_solution", "bug_type", "failure_symptoms", "import", "test_setup", "test", "example_test", "entry_point", "signature", "docstring", "instruction"
|
58 |
]
|
59 |
),
|
60 |
HumanEvalPackConfig(
|
61 |
name="go",
|
62 |
description="Go HumanEvalPack",
|
63 |
features=[
|
64 |
+
"task_id", "prompt", "declaration", "canonical_solution", "buggy_solution", "bug_type", "failure_symptoms", "import", "test_setup", "test", "example_test", "entry_point", "signature", "docstring", "instruction"
|
65 |
]
|
66 |
),
|
67 |
HumanEvalPackConfig(
|
68 |
name="cpp",
|
69 |
description="C++ HumanEvalPack",
|
70 |
features=[
|
71 |
+
"task_id", "prompt", "declaration", "canonical_solution", "buggy_solution", "bug_type", "failure_symptoms", "import", "test_setup", "test", "example_test", "entry_point", "signature", "docstring", "instruction"
|
72 |
]
|
73 |
),
|
74 |
HumanEvalPackConfig(
|
75 |
name="rust",
|
76 |
description="Rust HumanEvalPack",
|
77 |
features=[
|
78 |
+
"task_id", "prompt", "declaration", "canonical_solution", "buggy_solution", "bug_type", "failure_symptoms", "import", "test_setup", "test", "example_test", "entry_point", "signature", "docstring", "instruction"
|
79 |
]
|
80 |
),
|
81 |
]
|
|
|
87 |
features=datasets.Features(
|
88 |
{
|
89 |
"task_id": datasets.Value("string"),
|
90 |
+
"prompt": datasets.Value("string"),
|
|
|
91 |
"declaration": datasets.Value("string"),
|
92 |
"canonical_solution": datasets.Value("string"),
|
93 |
"buggy_solution": datasets.Value("string"),
|
94 |
"bug_type": datasets.Value("string"),
|
95 |
"failure_symptoms": datasets.Value("string"),
|
96 |
"entry_point": datasets.Value("string"),
|
97 |
+
"import": datasets.Value("string"),
|
98 |
"test_setup": datasets.Value("string"),
|
99 |
+
"test": datasets.Value("string"),
|
100 |
"example_test": datasets.Value("string"),
|
101 |
"signature": datasets.Value("string"),
|
102 |
"docstring": datasets.Value("string"),
|
|
|
134 |
yield key, {
|
135 |
"task_id": row["task_id"],
|
136 |
"prompt": row["prompt"],
|
|
|
137 |
"declaration": row["declaration"],
|
|
|
138 |
"canonical_solution": row["canonical_solution"],
|
139 |
+
"buggy_solution": row["buggy_solution"],
|
140 |
"bug_type": row["bug_type"],
|
141 |
"failure_symptoms": row["failure_symptoms"],
|
142 |
+
"import": row.get("import", ""), # Only for Go
|
|
|
143 |
"test_setup": row.get("test_setup", ""), # Only for Go
|
144 |
+
"test": row["test"],
|
145 |
"example_test": row["example_test"],
|
146 |
+
"entry_point": row["entry_point"],
|
147 |
"signature": row["signature"],
|
148 |
"docstring": row["docstring"],
|
149 |
"instruction": row["instruction"],
|