Skip to content

Commit 301f936

Browse files
committed
refactor: set the de facto timeout for HumanEval+ to be 10s
1 parent 2873e21 commit 301f936

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

bigcode_eval/tasks/humanevalplus.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
Homepage: https://github.com/evalplus/evalplus
88
"""
99

10+
from warnings import warn
11+
1012
from bigcode_eval.tasks.humaneval import GeneralHumanEval
1113

1214
_CITATION = """
@@ -27,6 +29,14 @@ class GeneralHumanEvalPlus(GeneralHumanEval):
2729

2830
DATASET_PATH = "evalplus/humanevalplus"
2931

32+
def __init__(self, strip_prompt, k=[1, 10, 100], num_workers=16, timeout=10.0):
33+
if timeout < 10.0:
34+
warn(
35+
"It is suggested to have a longer timeout as HumanEval+ has lots of tests. "
36+
f"The current timeout is {timeout}s while the suggested timeout is 10s."
37+
)
38+
super().__init__(strip_prompt, k, num_workers, timeout)
39+
3040

3141
def create_task(strip_prompt):
3242
class HumanEvalPlus(GeneralHumanEvalPlus):

0 commit comments

Comments
 (0)