Spaces:
Runtime error
Runtime error
Update execute.py
Browse files- execute.py +2 -8
execute.py
CHANGED
@@ -36,14 +36,8 @@ def check_correctness(check_program, output, timeout, task_id, completion_id):
|
|
36 |
:param completion_id: an optional completion ID so we can match
|
37 |
the results later even if execution finishes asynchronously.
|
38 |
"""
|
39 |
-
|
40 |
-
result
|
41 |
-
|
42 |
-
p = multiprocessing.Process(target=unsafe_execute, args=(check_program, output, result, timeout))
|
43 |
-
p.start()
|
44 |
-
p.join(timeout=timeout + 1)
|
45 |
-
if p.is_alive():
|
46 |
-
p.kill()
|
47 |
|
48 |
if not result:
|
49 |
result.append("timed out")
|
|
|
36 |
:param completion_id: an optional completion ID so we can match
|
37 |
the results later even if execution finishes asynchronously.
|
38 |
"""
|
39 |
+
result = []
|
40 |
+
unsafe_execute(check_program, output, result, timeout)
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
if not result:
|
43 |
result.append("timed out")
|