Skip to content

Commit 32324d2

Browse files
committed
save pass@k to json file
1 parent afbf8de commit 32324d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bigcodebench/evaluate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ def stucking_checker():
276276
if not os.path.isfile(result_path):
277277
with open(result_path, "w") as f:
278278
json.dump(results, f, indent=2)
279+
280+
pass_at_k_path = result_path.replace("_eval_results.json", "_pass_at_k.json")
281+
pass_at_k["model"] = flags.samples.split("/")[-1].replace(".jsonl", "")
282+
pass_at_k["subset"] = flags.subset
283+
with open(pass_at_k_path, "w") as f:
284+
json.dump(pass_at_k, f, indent=2)
279285

280286

281287
def main():

0 commit comments

Comments
 (0)