Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lcb_runner/evaluation/compute_code_generation_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def check_correctness(sample, generation, timeout, debug=True):
p.join(
timeout=(timeout + 1) * len(json.loads(sample["input_output"])["inputs"]) + 5
)
try:
os.kill(p.pid, 9) # Force to kill the process by PID for safety
except:
None
if p.is_alive():
p.kill()
if not result:
Expand Down
2 changes: 1 addition & 1 deletion lcb_runner/evaluation/testing_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def run_test(sample, test=None, debug=False, timeout=6):

# Disable functionalities that can make destructive changes to the test.
# max memory is set to 4GB
reliability_guard()
reliability_guard(4 * 1024 * 1024 * 1024)

if debug:
print(f"start = {datetime.now().time()}")
Expand Down