capture
genlm.eval.domains.livecodebench_multilingual.capture
Full per-test execution capture for the multilingual-LCB (Agnostics) executor.
The graded path short-circuits on the first failing test and keeps only a solved/unsolved
verdict. capture_run re-runs the loop without short-circuiting and records every test's stdout,
stderr, exit code, and verdict. It reuses the vendored primitives and comparators, so its
per-test verdicts and aggregate solved match the official grader (checked for parity); the
vendored file is untouched.
For OCaml it compiles once (ocamlopt, ocamlc fallback) and runs the binary per test rather than
letting ocaml Main.ml recompile every invocation; a compile failure maps to EXECFAIL for all
tests, as the official path does.
capture_run(code, inputs, outputs, language, timeout=10.0, grading='exact', max_completion_seconds=1000000000.0)
Run every test of one solution and return (solved, per_test_records), no short-circuit.
Each record has test_idx, passed, output (untruncated stdout), error_message, error_code
(rollouts convention), status, and time_s. solved is all(per-test passed). A per-completion
wall cap (max_completion_seconds) records tests past the cap as not-passed, status "capped".
Source code in genlm/eval/domains/livecodebench_multilingual/capture.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |