Skip to content

Commit 51f7b78

Browse files
committed
fix execute
1 parent dbb7544 commit 51f7b78

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

bigcode_eval/tasks/custom_metrics/execute.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def check_correctness(check_program, timeout, task_id, completion_id):
3838

3939
p = multiprocessing.Process(target=unsafe_execute, args=(check_program, result, timeout))
4040
p.start()
41-
p.join(timeout=timeout + 3)
41+
p.join(timeout=timeout + 1)
4242
if p.is_alive():
4343
p.kill()
4444

@@ -71,9 +71,9 @@ def unsafe_execute(check_program, result, timeout):
7171
# Run program.
7272
try:
7373
exec_globals = {}
74-
# with swallow_io():
75-
with time_limit(timeout):
76-
exec(check_program, exec_globals)
74+
with swallow_io():
75+
with time_limit(timeout):
76+
exec(check_program, exec_globals)
7777
result.append("passed")
7878
except TimeoutException:
7979
result.append("timed out")

0 commit comments

Comments
 (0)