Strengthen do_approx_sphere regression guard#146
Merged
Conversation
The pr-test-analyzer review found that test_end_to_end_correlation_vs_fortran_from_sample_params_json's correlation/Amari thresholds at max_iter=100 don't reliably catch a reintroduced do_approx_sphere=false: measured 0.9986 correlation and 0.0049 Amari with the bug present, comfortably passing, only marginally failing by max_iter=500. Add a direct, deterministic assertion on the resolved do_approx_sphere value (independent of optimization dynamics) as the actual regression guard, and bump max_iter to 300 so the fit-based checks stay a meaningful secondary sanity check.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
- Coverage 80.20% 80.11% -0.10%
==========================================
Files 14 14
Lines 2102 2102
Branches 357 357
==========================================
- Hits 1686 1684 -2
- Misses 302 303 +1
- Partials 114 115 +1 🚀 New features to boost your workflow:
|
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
pr-test-analyzeragent found thattest_end_to_end_correlation_vs_fortran_from_sample_params_json's correlation/Amari thresholds atmax_iter=100don't reliably catch a reintroduceddo_approx_sphere=falseregression (measured 0.9986 correlation / 0.0049 Amari with the bug present at 100 iterations, only marginally failing by 500).do_approx_spherevalue, independent of optimization dynamics, as the actual regression guard.max_iterto 300 so the existing fit-based checks stay a meaningful secondary sanity check.Test plan
do_approx_sphereisFalse(tested via an in-memory params override, not touching the committed JSON).max_iter=300in ~75s.ruff check,ruff format --check,ty checkall pass.