Repository navigation
refactor(verifiers): pull the judge deploy and sample fan-out out of _judged, and share the run's sample overrides - #919
Open
earakely-scale wants to merge 1 commit into
Open
earakely-scale wants to merge 1 commit into
earakely-scale wants to merge 1 commit into
Conversation
…_judged, and share the run's sample overrides - `_judge_agent_of` finds or deploys the agent judge. - `_judge_agents` holds the judges for the grade and terminates the ones the step deployed. - `_side_by_side` and `_merged_samples` run and merge samples and batches. - `_JudgeOutcome` names the judge call's four results. - `judge_samples.overrides` builds the run overrides that bundle runs, `task run` and `eval run` each built by hand. - `splits` and `disagreement` share one tally. One judge and one batch still run in the caller's task, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
marked this pull request as ready for review
November 25, 2026 03:21
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
A refactor after #905, with no change in behavior.
RubricsVerifierTaskStep._judgedhad grown to 434 lines with eight nested functions. This PR moves its judge setup and its fan-out into helpers of their own, and the method drops to 357 lines._judge_agent_of(context, run): finds the task's agent judge (agent_name), or deploys one with the run's model key and endpoint. This code was inline in a closure._judge_agents(make, count): an async context manager that holds the grade's agent judges: none for a direct judge, one, or one per sample. It terminates each one the step deployed on the way out. It replaces the hand-written task group, the cleanup on a failed deploy, and thefinallyat the end of grading._side_by_side(calls): runs coroutines at once and raises the first failure as itself. It replaces two copies of the TaskGroup-and-unwrap code, one for samples and one for batches._merged_samples(outcomes): merges a batch's samples into one outcome: median rows, summed retries, discrepancies named by sample, the first trajectory._JudgeOutcome: aNamedTuplefor the four results_run_judge_with_output_retriesreturns. Code readso.rowsando.retriesinstead of unpacking_, _, ds, _. It's still a tuple, so subclasses and test stubs that return plain tuples work unchanged.judge_samples.overrides(samples, bar): builds the run overrides.bundle/run.py,task runandeval runeach built them by hand, with the same asymmetry: a count is left out when it's None, but a bar of 0 is kept.judge_samples.py:splitsanddisagreementshare one tally of passes. A local variable no longer shadowssplits, and both functions use one test for a sampled row.One judge and one batch still run in the caller's task, as before #905, so the one-sample path runs the same code.
Tests
tst/unit/task_step, the bundle-run and CLI tests. The 4 tests incomputer_exec_test.pyfail on macOS before and after this change, because they shell out with GNU tools.test_rubrics_verifier_judge_samples.pyadds two assertions onjudge_samples.overrides.E2E
Run on an admin VM through the real LiteLLM proxy, behind the logging pass-through and grade checker that #905's rounds used, on 8601fab beside main af545d9. It spent about $6.20.
user_sim_judge.retry_configgraded again, its line namingJudgeDisagreementError.judge-agent-effortat 3 samples passed with c2 named as split, and at 1.0 failed on it.agent-env runs of verifier-deployed, task-deployed and always-on judges at 1 to 5 samples. That chaos above used direct judges only, and these are the paths_judge_agent_ofand_judge_agentstook over. After every run a checker looked for containers left up, sandbox folders left behind and tracebacks._judge_agentsterminated every one.AgentUnreachableErrornaming it, the run exited 1, and the other samples' judges were terminated.LocalSandbox.terminate()keeps the folder, and teardown removes only the folders of sandboxes a run records. Main leaves one folder at one sample and two at two, as this branch does.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable regressions or rule violations were found.Summary
Extracts judge deployment, cleanup, parallel calls, and sample merging from
_judged.Reviews (2) · Last reviewed commit: "refactor(verifiers): pull the judge depl..." · Reviewed by Greptile