Commit
·
be108c7
1
Parent(s):
c9a4e2f
Update humaneval-x-bugs.py
Browse files- humaneval-x-bugs.py +7 -5
humaneval-x-bugs.py
CHANGED
|
@@ -57,14 +57,14 @@ class HumanEvalXBugs(datasets.GeneratorBasedBuilder):
|
|
| 57 |
name="python",
|
| 58 |
description="Python HumanEvalBugs",
|
| 59 |
features=[
|
| 60 |
-
"task_id", "prompt", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 61 |
]
|
| 62 |
),
|
| 63 |
HumanEvalXBugsConfig(
|
| 64 |
name="cpp",
|
| 65 |
description="C++ HumanEvalBugs",
|
| 66 |
features=[
|
| 67 |
-
"task_id", "prompt", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 68 |
]
|
| 69 |
),
|
| 70 |
|
|
@@ -72,14 +72,14 @@ class HumanEvalXBugs(datasets.GeneratorBasedBuilder):
|
|
| 72 |
name="go",
|
| 73 |
description="Go HumanEvalBugs",
|
| 74 |
features=[
|
| 75 |
-
"task_id", "prompt", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 76 |
]
|
| 77 |
),
|
| 78 |
HumanEvalXBugsConfig(
|
| 79 |
name="java",
|
| 80 |
description="Java HumanEvalBugs",
|
| 81 |
features=[
|
| 82 |
-
"task_id", "prompt", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 83 |
]
|
| 84 |
),
|
| 85 |
|
|
@@ -87,7 +87,7 @@ class HumanEvalXBugs(datasets.GeneratorBasedBuilder):
|
|
| 87 |
name="js",
|
| 88 |
description="JavaScript HumanEvalBugs",
|
| 89 |
features=[
|
| 90 |
-
"task_id", "prompt", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 91 |
]
|
| 92 |
),
|
| 93 |
]
|
|
@@ -100,6 +100,7 @@ class HumanEvalXBugs(datasets.GeneratorBasedBuilder):
|
|
| 100 |
{
|
| 101 |
"task_id": datasets.Value("string"),
|
| 102 |
"prompt": datasets.Value("string"),
|
|
|
|
| 103 |
"declaration": datasets.Value("string"),
|
| 104 |
"canonical_solution": datasets.Value("string"),
|
| 105 |
"buggy_solution": datasets.Value("string"),
|
|
@@ -138,6 +139,7 @@ class HumanEvalXBugs(datasets.GeneratorBasedBuilder):
|
|
| 138 |
yield key, {
|
| 139 |
"task_id": row["task_id"],
|
| 140 |
"prompt": row["prompt"],
|
|
|
|
| 141 |
"declaration": row["declaration"],
|
| 142 |
"buggy_solution": row["buggy_solution"],
|
| 143 |
"canonical_solution": row["canonical_solution"],
|
|
|
|
| 57 |
name="python",
|
| 58 |
description="Python HumanEvalBugs",
|
| 59 |
features=[
|
| 60 |
+
"task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 61 |
]
|
| 62 |
),
|
| 63 |
HumanEvalXBugsConfig(
|
| 64 |
name="cpp",
|
| 65 |
description="C++ HumanEvalBugs",
|
| 66 |
features=[
|
| 67 |
+
"task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 68 |
]
|
| 69 |
),
|
| 70 |
|
|
|
|
| 72 |
name="go",
|
| 73 |
description="Go HumanEvalBugs",
|
| 74 |
features=[
|
| 75 |
+
"task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 76 |
]
|
| 77 |
),
|
| 78 |
HumanEvalXBugsConfig(
|
| 79 |
name="java",
|
| 80 |
description="Java HumanEvalBugs",
|
| 81 |
features=[
|
| 82 |
+
"task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 83 |
]
|
| 84 |
),
|
| 85 |
|
|
|
|
| 87 |
name="js",
|
| 88 |
description="JavaScript HumanEvalBugs",
|
| 89 |
features=[
|
| 90 |
+
"task_id", "prompt", "import", "declaration", "buggy_solution", "canonical_solution", "test", "example_test", "bug_type", "failure_symptoms", "entry_point"
|
| 91 |
]
|
| 92 |
),
|
| 93 |
]
|
|
|
|
| 100 |
{
|
| 101 |
"task_id": datasets.Value("string"),
|
| 102 |
"prompt": datasets.Value("string"),
|
| 103 |
+
"import": datasets.Value("string"),
|
| 104 |
"declaration": datasets.Value("string"),
|
| 105 |
"canonical_solution": datasets.Value("string"),
|
| 106 |
"buggy_solution": datasets.Value("string"),
|
|
|
|
| 139 |
yield key, {
|
| 140 |
"task_id": row["task_id"],
|
| 141 |
"prompt": row["prompt"],
|
| 142 |
+
"import": row.get("import", ""), # Only for Go
|
| 143 |
"declaration": row["declaration"],
|
| 144 |
"buggy_solution": row["buggy_solution"],
|
| 145 |
"canonical_solution": row["canonical_solution"],
|