Repository navigation
Vanished-factor tests: construct the vanished factor (Windows CI fix) - #183
Merged
Merged
Conversation
windows-latest 3.12 failed test_ols_fit_with_a_factor_that_vanishes_finishes [fast-173] with "zero-size array to reduction operation maximum": the fit itself finished, but on Windows the fast fit from seed 173 kept all four factors, so the test's own np.abs(m.weights_[vanished]).max() reduced an empty selection (before its assert vanished.any()). The seed only produced a vanished factor on macOS's trajectory. The tests now start the fit with the vanished factor(s) in place: width at the lower bound and center at the grid point farthest from every voxel (squared distance / width > 2000, far past exp underflow). A factor that is 0 everywhere has zero derivatives, so no step moves it on any platform. Both modes; plus a test that a start where every factor vanishes (all gram eigenvalues below GRAM_FLOOR) raises the documented ValueError. Audit of the reductions in bounded_lm, gram_solve, ridge_weights, the identity path and TFA's iteration: each runs on a non-empty array (K >= 1, V >= 1, free set checked first), so no library change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Fixes the windows-latest 3.12 failure of
test_ols_fit_with_a_factor_that_vanishes_finishes[fast-173]on main (job 122609397693).The fit finished; the test reduced an empty selection because on Windows the fast fit from seed 173 kept every factor. The tests now construct the vanished factor in the start (zero derivatives, so it stays vanished on every platform), in both modes, and check that a start where every factor vanishes raises the documented ValueError.
Draft PR to run the full CI matrix before the commit goes to main.
🤖 Generated with Claude Code