Skip to content

Vanished-factor tests: construct the vanished factor (Windows CI fix) - #183

Merged
jeremymanning merged 1 commit into
mainfrom
fix/vanish-test
Oct 28, 2026
Merged

jeremymanning merged 1 commit into
mainfrom
fix/vanish-test

Conversation

@jeremymanning

Copy link
Copy Markdown
Member

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

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>
@jeremymanning
jeremymanning merged commit 479fe8f into main Oct 28, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant