Skip to content

Commit 1a2919e

Browse files
committed
fix typos
1 parent 37d25da commit 1a2919e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ Following which, you can run the built container as shown in above.
160160
161161
* `task_id` is the identifier string for the task
162162
* `entry_point` is the name of the function
163-
* `prompt` is the prompt for BigCodeBench-Complete
164-
* `instruction` is the prompt for BigCodeBench-Instruct
163+
* `complete_prompt` is the prompt for BigCodeBench-Complete
164+
* `instruct_prompt` is the prompt for BigCodeBench-Instruct
165165
+ `canonical_solution` is the ground-truth implementation
166166
+ `test` is the `unittest.TestCase` class
167167

bigcodebench/data/bigcodebench.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ def get_bigcodebench(
4040
"""Get BigCodeBench from BigCode's github repo and return as a list of parsed dicts.
4141
4242
Returns:
43-
List[Dict[str, str]]: List of dicts with keys "prompt", "test", "entry_point"
43+
List[Dict[str, str]]: List of dicts with keys "complete_prompt", "instruct_prompt", "canonical_solution", "test", "entry_point"
4444
4545
Notes:
4646
"task_id" is the identifier string for the task.
47-
"prompt" is the prompt to be used for the task (function signature with docstrings).
48-
"test" is test-cases wrapped in a `check` function.
47+
"complete_prompt" is the prompt to be used for BigCodeBench-Complete.
48+
"instruct_prompt" is the prompt to be used for BigCodeBench-Instruct.
49+
"canonical_solution" is the ground-truth implementation
50+
"test" is the `unittest.TestCase` class.
4951
"entry_point" is the name of the function.
5052
"""
5153
# Check if open eval file exists in CACHE_DIR

bigcodebench/generate.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ def codegen(
6969

7070
sidx = n_samples - nsamples
7171
while sidx < n_samples:
72-
if subset == "instruct":
73-
prompt = task["instruct_prompt"]
74-
elif subset == "complete":
75-
prompt = task["complete_prompt"]
72+
prompt = task[f"{subset}_prompt"]
7673
else:
7774
raise Exception(f"Invalid subset {subset}")
7875
if strip_newlines:

bigcodebench/inspect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def inspection(args):
3030
os.makedirs(task_path)
3131
task_id_data = problems[task_id]
3232
with open(os.path.join(task_path, "ground_truth.py"), "w") as f:
33-
f.write(task_id_data["complete_prompt"] + "\n\n" + task_id_data["canonical_solution"])
33+
f.write(task_id_data[f"{args.subset}_prompt"] + "\n\n" + task_id_data["canonical_solution"])
3434

3535
# write test
3636
with open(os.path.join(task_path, "test_case.py"), "w") as f:
@@ -49,6 +49,7 @@ def inspection(args):
4949
def main():
5050
parser = argparse.ArgumentParser()
5151
parser.add_argument("--eval-results", required=True, type=str)
52+
parser.add_argument("--subset", required=True, type=str)
5253
parser.add_argument("--in-place", action="store_true")
5354
args = parser.parse_args()
5455

0 commit comments

Comments
 (0)