feat(escalation): gate switching on calibrated utility - #638
Draft
pst2154 wants to merge 2 commits into
Draft
Conversation
Signed-off-by: Alex Steiner <asteiner@nvidia.com>
Signed-off-by: Alex Steiner <asteiner@nvidia.com>
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.
Summary
expected_capable_gaincalibration to the escalation routeThis is an independent PR based directly on
main. It complements the fresh-evidence fix in #637 but does not include that PR's commits.Held-out evidence
Twenty deterministic held-out SWE-Atlas TW tasks were run once under each of five arms (100/100 final valid cells):
-0.10)The calibrated arm's routing invariant held across all 800 calls: every call was a GLM worker call, with no judge or Opus call. The uncalibrated patched arm had one long-tail task that made 146 judge calls and 144 GLM calls before a valid late switch, then 30 latched Opus calls; it scored 0 and cost $7.392 synthetically by itself.
The accuracy point estimates are not treated as causal. Three independently sampled GLM-worker arms scored 4/20, 8/20, and 9/20, and held-out Opus beat direct GLM despite the calibration sample showing the reverse. The report therefore concludes that this gate is a mechanical safety constraint when external calibration is reliable, not an automatic model-order solution. A full #601-style solution needs pool-owned, task-conditioned, uncertainty-aware utility estimates.
Synthetic costs include uncached input, cached input, output, and classifier/judge tokens. They are comparative assumptions, not provider prices. See the full report for formulas, rates, methodology, limitations, and reproduction assets.
Validation
uv sync --lockedcargo fmt --all --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-featuresuv run ruff check .uv run mypy switchyarduv run maturin develop --uvuv run pytest tests/ -v -m "not integration"— 116 passed, 2 deselected, 2 subtests passedmake -C docs publishAll commands passed on Rust 1.96.1 in a Slurm compute job.