Repository navigation
Conversation
…quivalent NewtonBench's symbolic judge catches every API error and, after three failed attempts, returns False: the same value as a "not equivalent" verdict. A missing judge key or a sustained 429 therefore set R_symbolic to -1, so an exact law with RMSLE 0 scored 0.4 instead of 1.0. - Refuse to start when NewtonBench cannot resolve an API key for its judge model, using NewtonBench's own key lookup (environment and its .env file). - Record each judge API attempt during verify. When the last attempt raised, the judge gave no verdict, so verify raises a JudgeError and judge_failsafe masks the sample (mask_sample, failure_kind judge_failed). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…the network The server now refuses to start without a judge key, so tests that build the app with setup_webserver need one. The placeholder comes with a requests.post that fails at once, so a test that reaches the judge never calls a real API. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test ed7f893 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
RISK — Add the required real smoke-rollout evidence
The validation describes unit tests and a scripted probe with no real model or judge endpoint. That leaves the changed startup and verification path without the representative model rollout required by protected AGENTS.md. The tests provide useful fault-injection coverage, but don't show that a model-generated law reaches a working judge and remains an ordinary scored result.
Correction: Could you run a representative rollout with a real model and a working gpt41 judge, inspect the agent, tool, and verifier behavior, and record the command, model and judge identities, selected task, artifact location, and result in the PR's validation section? No source patch is indicated by this evidence gap. The configuration declares training data; a full evaluation or reward profile isn't required for training environments, but the real smoke rollout is (CONTRIBUTING.md).
Preservation and acceptance: The proposed smoke check should start successfully with a supported judge key, exercise the public rollout/verification workflow, and produce an unmasked result whose reward agrees with the returned symbolic verdict and RMSLE. Retain the existing regression assertions: missing credentials reject startup; missing credentials during verification and sustained 429s produce mask_sample: true and failure_kind: judge_failed; a recovered judge verdict scores the exact law with RMSLE 0.0 and reward 1.0.
I completed the static review of all four changed files and the directly affected masking, routing, and cleanup contracts. I found no additional source-proven defect. I didn't execute tests. The runtime-cloned NewtonBench dependency isn't present in either immutable tree, so I couldn't independently verify its key resolver or the upstream parsing/retry assumptions behind the last-attempt rule.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
What
newton_benchnow refuses to start when NewtonBench has no API key for its symbolic judge (gpt41). The check calls NewtonBench's own key lookup (utils.call_llm_api.keys). That lookup reads the environment and NewtonBench's.envfile, so a key kept in.envstill works. This replaces twologging.warningcalls.verifyrecords each API attempt of the judge. It does this by wrapping thecall_llm_apithatmodules.common.evaluationcalls. If the judge's last attempt raised, the judge gave no verdict.verifythen raises aJudgeError, andjudge_failsafemasks the sample (mask_sample: true,failure_kind: judge_failed) instead of scoring R_symbolic = -1.tests/conftest.pygains an autouse fixture. It gives the judge a placeholder key and makesrequests.postfail at once. Tests that build the app withsetup_webservercan then start the server, and no test reaches a real API.Why
NewtonBench's
llm_symbolic_equivalence_judgecatches every error of its API call. After three attempts it returnsFalse, which is also its "not equivalent" verdict. So a missing judge key or a sustained 429 set R_symbolic to -1, and an exact law with RMSLE 0 scored 0.4 instead of 1.0. An outage is not a wrong answer.weijiac0619 raised this on #5485 (comment). No separate issue was filed; this PR is the fix.
Why the last attempt decides: the judge returns as soon as a reply carries a verdict. So if its last API attempt raised, none of the earlier attempts gave a verdict either.
Interaction with #5485
#5485 (typed resources sessions) adds a verify-result cache. For the retry window, it answers a resent verify with the stored outcome. Without this fix, that cache would also replay the 0.4 an outage produced. With this fix:
JudgeErrorpropagates before the cache stores anything.verifystill releases the session, so a resent verify is masked assession_lost.Merging with #5485's head (
800cb4e) gives two conflicts, and both are resolved by keeping both sides:app.py: adjacent import lines.tests/test_app.py: both branches append to the end of the file.#5485's
setup_webserver-based tests need the new conftest fixture once this lands. On the merged tree, all 96 newton_bench tests pass.Compatibility and benchmark impact
Validation
pytest resources_servers/newton_bench/testsin the server's venv, with NewtonBench at upstream HEAD912a4ba: 66 passed.origin/main'sapp.py:test_setup_webserver_refuses_to_start_without_judge_key: DID NOT RAISE.test_verify_masks_judge_without_key: the exact law came back as a scored 0.4 row.test_verify_masks_judge_rate_limited_on_every_attempt: the exact law came back as a scored 0.4 row.test_setup_webserver_starts_with_judge_keytest_verify_scores_judge_verdict_after_rate_limitevaluate_lawand judge. They patch only the key dict andrequests.post.800cb4e: 96 passed, ruff clean.tests/unit_tests/test_public_api_facades.pyandtests/unit_tests/tooling/test_migrate_imports.py: 870 passed.pre-commit run --fileson the changed files: passed.Rollout evidence
N/A for model rollouts. The change is in how the verifier handles judge API failures, and no model or judge endpoint is configured where this change was made.
Instead, a scripted probe (no real model, no real judge) ran through
TestClienton #5485's typed sessions:rmsle0.0,symbolic_equivalentfalse)judge_failedsession_lost🤖 Generated with Claude Code