harness
genlm.eval.domains.livecodebench.harness
Subprocess wrapper around the vendored LCB run_test: it patches the
interpreter destructively (reliability_guard) and needs main-thread
signal.alarm, so it must run in a forked child, as in official lcb_runner.
check_correctness(sample, generation, timeout=6.0, debug=False, max_total_seconds=None)
Run generation against the tests in a forked child.
results is per-test True/False (or sentinel ints -1/-2/-4
on failure). max_total_seconds caps the official per-sample wall-clock budget
of (timeout + 1) * n_tests + 5 — the budget only binds when generated code
hangs in a way signal.alarm can't interrupt, so capping it bounds the stall
from a single pathological generation without affecting normal grading.
Source code in genlm/eval/domains/livecodebench/harness.py
passed_all(sample, generation, timeout=6.0, max_total_seconds=None)
True iff every test passed (> 0), matching official np.all(gen > 0).