Skip to content

Commit 617b5bd

Browse files
committed
fix(inspect): avoid empty folder
1 parent 4ab7c7f commit 617b5bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bigcodebench/inspect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ def inspection(args):
2323

2424
eval_results = json.load(open(args.eval_results, "r"))
2525
for task_id, results in eval_results["eval"].items():
26+
if task_id not in problems:
27+
continue
2628
if all(result["status"] == "pass" for result in results):
2729
continue
2830
task_path = os.path.join(path, task_id)
2931
if not os.path.exists(task_path):
3032
os.makedirs(task_path)
31-
if task_id not in problems:
32-
continue
3333
task_id_data = problems[task_id]
3434
with open(os.path.join(task_path, "ground_truth.py"), "w") as f:
3535
f.write(task_id_data[f"{args.split}_prompt"] + "\n\n" + task_id_data["canonical_solution"])

0 commit comments

Comments
 (0)