Repository navigation
Count failed batched requests as hard failures, not empty responses - #418
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
vllm_server and litellm map a failed request to an empty output list, and process_batch recorded that as a successful response. The empty output was then scored, so a run where every request 400s (max_tokens beyond the server's max_model_len, #310) finished Success with a 0.0 score. The hard-failure gate from #327 only saw the scaffolded chat path, which raises. process_batch now records a request that yields no outputs as a hard failure. This routes the batched path into the existing gate: a task that saves nothing fails, and one above max_hard_failure_rate fails the run. Loglikelihood requests with no continuations still legitimately yield no outputs and are left alone. The dispatcher also logs one ERROR summary naming the first per-request error, so the cause is visible without scanning per-request warnings. Co-Authored-By: Claude Code <[email protected]>
513eba7 to
b9e28ac
Compare
… failure Only the no-continuations case was pinned, so dropping the continuations clause from the guard left every test green while vllm_server's empty alogprobs results scored as empty again. Addresses independent review on #418. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The problem is real, and the fix works. I'd still suggest a different approach before merging: have the providers report the error themselves instead of having the runner guess from an empty list. The bug is realOn I checked this. With A better fix: use the error-marker contract that already exists
The PR says carrying the exception through would mean "changing the provider contract", but this is that contract. The fix would sit at the four What this gets you:
The empty-output check in this PR could stay as a fallback for third-party providers. If it stays, it should be the backup, not the main mechanism. Specific issues if the current approach is kept
TestsThe tests are good. They drive a real VerdictMergeable as is, since it closes a real silent-failure hole. I'd ask you to consider the |
Preserve per-request provider exceptions and remove the logprobs re-probe
Include the approved OMEGA extraction fix
Keep tool-validation documentation consistent with marked failures
|
Codex · codex://threads/01a1326f-ed81-75e3-80e4-661392dbe4b5 Addressed in 2e5dd71 and 30e073a. Both providers now use the existing error-marker contract and retain the original exception in the task result. The dispatcher exposes ordered results with exceptions, the logprobs re-probe is gone, single-request calls avoid a duplicate ERROR summary, and first-error selection uses an explicit None check. The empty-output check remains only as a fallback for providers that omit a marker. Updated the description to call out the exit-code change. On current main, SciCode uses |
Update provider-error fixes after the approved IFBench merge
Preserve failed logprob judges and bound per-request error messages after Claude review
There was a problem hiding this comment.
This review was generated by an agent following
REVIEW_GUIDE.md. It is not from a human reviewer. Reply in the PR thread and a maintainer will follow up.
Looks good! Nothing blocking. The marker-based rework closes #310 cleanly, and I have two non-blocking points and a few nits.
What I checked on aa3c872:
- Ruff check and format pass.
ty check src/reports only the existingunused-type-ignore-commentwarning that is also onmain. - The full unit suite passes in a local worktree: 3327 passed, 35 skipped. The 57 tests in the four changed test files pass.
- I read every caller of
agenerate/alogprobsoutside the providers:vanillux,bfcl_multi_turn,scicode,llm_judge, and the metrics collector. Each already handles a marked output throughrequest_error,first_output, oris_context_overflow_output. The switch from[]to a marked output does not make any of them silently treat a failure as an empty answer. - The earlier review items are addressed: the
alogprobsre-probe is gone, the dispatcher summary is skipped for single requests,first_erroruses an explicitNonecheck, and the runner comment no longer names providers.
Non-blocking
-
src/olmo_eval/common/scorers/llm_judge.py:393
A judge request failure still ends up as a 0.0 score in the aggregate.first_outputraises a plainRuntimeError.Task.score_responses(src/olmo_eval/evals/tasks/common/base.py:819-830) catches it and returnsOutputScore(..., 0.0, error)._format_scoring_erroronly setsinfrastructure: "true"forScoringIncompleteErrorandSandboxInfrastructureError, so_count_infrastructure_scoring_errors(src/olmo_eval/runners/asynq/preparation.py:366) does not count it and the task result carries no error. I confirmed this by passing theRuntimeErrorfromfirst_outputon a marked output to_format_scoring_error: it returns{'phase': 'context', 'type': 'RuntimeError', 'message': 'BadRequestError: 400'}with noinfrastructureflag.
This PR is still an improvement. Before it, the same failure was a parse error with no message. Now the provider error at least lands inscoring_errors. The remaining gap comes from the framework's scoring-error path, which predates this PR. The PR description ("logprob judges propagate marked failures") and the test nametest_strongreject_request_failure_raises_instead_of_becoming_zero(tests/core/test_llm_judge_request_errors.py:17) suggest the run fails loudly, but in a real run the instance still scores zero.
Could we raiseScoringIncompleteErrorfrom the judge's provider paths when the request is marked failed, so the task gets the "Incomplete" error?_infrastructure_errorcurrently says "sandbox infrastructure", so its wording would need to become generic. If that is out of scope here, please file a follow-up issue: "Judge provider request failures are folded into metrics as 0.0 and are not reported as incomplete scores." Then rename the test to describe what it checks, for exampletest_strongreject_request_failure_raises_from_scorer. -
src/olmo_eval/common/scorers/llm_judge.py:390
Theif outputs:guard keeps an empty result silent. For a loglikelihood request with continuations, an emptyoutputsskipsfirst_output, the dict comprehension returns{}, and_parse_strongreject_responsescores 0.0 withis_parsing_error=True. The runner treats the same empty result as a hard failure (src/olmo_eval/runners/asynq/processing.py:250-254). Both built-in API providers now always mark failures, so this only affects third-party providers. Should the judge callfirst_output(outputs)unconditionally here, so that both paths treat an empty result the same way?
Nits
- Nit:
tests/runners/test_partial_failure_reporting.py:468The docstring "vllm_server's alogprobs returns [] for a request it could not serve" is no longer true after this PR. Something like "A provider that returns no outputs for a request with continuations has failed it" describes the fallback the test covers. - Nit:
src/olmo_eval/inference/utils.py:31The 500-character limit would read better as a named module constant, e.g._MAX_REQUEST_ERROR_CHARS = 500. - Nit:
dispatch_requests(src/olmo_eval/inference/utils.py:15) is covered only through the two providers intests/providers/test_request_errors.py. A direct test of the helper (a failed item becomes one marked output, aNoneresult becomes[], order is kept) would make its contract explicit. - Nit: Five commits are titled only with a Codex thread URL. Squash-merging with the PR title takes care of it.
Before merge
Nothing blocks the merge. Please either address non-blocking item 1 here or file the follow-up issue described above and link it from the PR. After that you may merge once CI is green.
Reject empty judge logprob results and test provider dispatch ordering.
alogprobs now reads _openai_params (added in #477), which __init__ sets. These tests build the provider with __new__, so set it explicitly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Codex · codex://threads/01a1326f-ed81-75e3-80e4-661392dbe4b5
Batched LiteLLM and vLLM failures now preserve exception types/messages in
request_errormarkers instead of becoming empty outputs or zero grades. The runner applies its existing hard-failure threshold; logprob judges propagate marked failures. The dispatcher retains its existing result-only interface and adds ordered per-request error results. Error text is bounded; the redundant vLLM logprobs probe is removed.Behavior change: runs exceeding the default 5% hard-failure threshold exit 1. Setting
max_hard_failure_rate=1.0tolerates partial failures; zero saved instances still fail.Validation: independent Claude review and follow-up verification; provider, dispatcher and StrongReject regressions; Ruff/type checks and full Python CI pass.