Repository navigation
fix(eval): explain a non-positive gain as no improvement, not noise - #1147
Merged
Merged
Conversation
Collaborator
|
Review (Birfy) Tip SHA: 866325e
|
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.
Fixes #1091.
What changed
_noise_refusal_note(trust_evidence.py:335) promised three causes in its docstring, butdistinguishable(stats_eval.py) is false for four;gain <= 0.0had no branch, so a regression fell through to whichever other cause was true (3 noisy repeats at gain −0.300 printed a± 0.200band; one repeat blamed the repeat count).The note now branches first on
noise.gain <= 0.0:<head> (the candidate did not improve on the baseline: the gain must be positive), with no second print of the gain. The docstring lists the four causes in code order. Every branch keepsnot distinguishable from noise;distinguishable, theverdictstrings andgain_over_noiseare unchanged, as is the acceptance rule.Three files, +51/−5:
agentdescent/trust_evidence.py;tests/test_trust_evidence_noise.py(negative gain, exactgain == 0.0, and a+8.327e-16control that must stay in the floor branch because the guard is<= 0.0, not a tolerance);changelog.d/1091-negative-gain-note.md.Verification
Tip SHA:
866325e96e6e4213be6d3c7e160d92248a35a025Red first, clean main
71fe47b3with only the new rows:2 failed, 9 passed— both failuresassert 'did not improve on the baseline' in '… gain does not exceed the noise floor …'(test_a_regression_is_named_as_no_improvement_not_as_noise,test_an_exact_zero_gain_takes_the_no_improvement_branch).Ran:
pytest -q tests/test_trust_evidence_noise.py→11 passedpytest -q tests/test_noise_calibration.py tests/test_diagnose.py→33 passedpytest -qon the three files together →44 passedpython -m tools.changelog_fragments check→64 changelog fragment(s) OKpython -m tools.gen_api_docs --check→docs/api.md is up to dateNot run:
pytest -q→ not achievable on this host (22 failed, 10 errors, all environment: docker sandbox, apply_noop OSError, wheel smoke, genesis, era_srbench, skill-library installs, shadowing cwd); the failing node-id sets are identical at base71fe47b3. CI at the tip is the authoritative suite.mkdocs build --strict— no docs page ormkdocs.ymltouched.