Skip to content

Commit f55ca72

Browse files
committed
feat: consider gt pass rate
1 parent 7f529e8 commit f55ca72

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bigcodebench/gen/util/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,14 @@ def trusted_exec(code, test_code, task_id, max_as_limit, max_data_limit, max_sta
5151
start = time.time()
5252
with safe_environment(), swallow_io():
5353
suite.run(test_result)
54-
for test, trace in test_result.failures + test_result.errors:
55-
print(trace)
54+
5655
# Needed for cleaning up.
5756
shutil.rmtree = rmtree
5857
os.rmdir = rmdir
5958
os.chdir = chdir
60-
assert len(
61-
test_result.failures + test_result.errors
62-
) == 0, f"{task_id} failed with errors: {test_result.errors} and failures: {test_result.failures}"
6359

60+
if len(test_result.failures + test_result.errors) > 0:
61+
return None
6462
return time.time() - start
6563

6664
def trusted_check_exec(code, inputs):

0 commit comments

Comments
 (0)