Skip to content

Commit 81ec010

Browse files
committed
fix: add min time limit
1 parent 4a17a57 commit 81ec010

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bigcodebench/evaluate.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
Result = Tuple[str, List[bool]]
3535

3636

37-
def get_groundtruth(n_workers, problems, hashcode, check_gt_only, max_as_limit, max_data_limit, max_stack_limit):
37+
def get_groundtruth(n_workers, problems, hashcode, check_gt_only, max_as_limit, max_data_limit, max_stack_limit, min_time_limit):
3838
cache_file = os.path.join(CACHE_DIR, f"{hashcode}.pkl")
3939
if os.path.exists(cache_file):
4040
if check_gt_only:
@@ -60,7 +60,8 @@ def get_groundtruth(n_workers, problems, hashcode, check_gt_only, max_as_limit,
6060
problem["task_id"],
6161
max_as_limit,
6262
max_data_limit,
63-
max_stack_limit
63+
max_stack_limit,
64+
min_time_limit,
6465
)
6566

6667
futures.append(executor.submit(trusted_check, *args))
@@ -129,7 +130,7 @@ def evaluate(flags):
129130
dataset_hash = get_bigcodebench_hash(subset=flags.subset)
130131

131132
if not flags.no_gt:
132-
expected_time = get_groundtruth(n_workers, problems, dataset_hash, flags.check_gt_only, flags.max_as_limit, flags.max_data_limit, flags.max_stack_limit)
133+
expected_time = get_groundtruth(n_workers, problems, dataset_hash, flags.check_gt_only, flags.max_as_limit, flags.max_data_limit, flags.max_stack_limit, flags.min_time_limit)
133134
else:
134135
expected_time = {task_id: None for task_id in problems}
135136

0 commit comments

Comments
 (0)