Skip to content

Commit ff8f629

Browse files
committed
fix: move expected time
1 parent f55ca72 commit ff8f629

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

bigcodebench/evaluate.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ def evaluate(flags):
110110
assert flags.samples.endswith(".jsonl")
111111
result_path = flags.samples.replace(".jsonl", "_eval_results.json")
112112

113+
if not flags.no_gt:
114+
expected_time = get_groundtruth(problems, dataset_hash, flags.check_gt_only)
115+
else:
116+
expected_time = {task_id: None for task_id in problems}
117+
113118
if os.path.isfile(result_path):
114119
print(f"Load from previous results from {result_path}")
115120
with open(result_path, "r") as f:
@@ -119,12 +124,6 @@ def evaluate(flags):
119124
else:
120125
problems = get_bigcodebench()
121126
dataset_hash = get_bigcodebench_hash()
122-
expected_time = None
123-
124-
if not flags.no_gt:
125-
expected_time = get_groundtruth(problems, dataset_hash, flags.check_gt_only)
126-
else:
127-
expected_time = {task_id: None for task_id in problems}
128127

129128
if flags.check_gt_only:
130129
return

0 commit comments

Comments
 (0)