Repository navigation
Task 17: platform-independent whole-fit check (CI fix) - #182
Merged
Merged
Conversation
…nished weight CI on bb41822 failed off macOS-Accelerate: 1. test_fits_match_3298278 compared against fits saved on one Mac. On OpenBLAS/MKL the rounding differs, and case 23 (10^3 grid, K=6, noise 0.5) lands on another optimum: on the Mac both versions end at a local optimum (centers 1.75 lengths from the truth); on Linux both recover the truth. The test now fits each case with the current kernels and with the same TFA on the frozen 3298278 kernels (tests/reference_kernels_3298278.py; tfa.py is unchanged since 3298278), on the machine that runs it, and compares only cases that are well-conditioned by a computed criterion: the oracle fit recovers the truth to 0.2 lengths and its fit on 1e-12-perturbed data agrees within the tolerances. At least 30 of 36 must qualify (macOS 35, Linux/OpenBLAS 36). Tolerances unchanged. The saved fits and their script are removed. 2. test_ols_fit_with_a_factor_that_vanishes_finishes required the vanished factor's weight to be <= 1e-8 of the largest; macOS runners with Python 3.10/3.11 gave 1.2e-8. Not a bug: the eigensolver mixes the zero column's direction into the eigenvector of the smallest kept eigenvalue by about eps x the kept condition number (6.3e7 here), so the bound is (K_kept - 1) eps cond (2.8e-8), computed in the test from the gram. Reproduced in docker python:3.10 (scipy-openblas): the old test fails on case 23; both tests pass after the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ue9wuWfgA8yRXEuEiydTVh
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.
Draft PR to run the full test matrix on the fix for the CI failures of bb41822 (see the commit message of cc5a287):
test_fit_equivalence: compared against fits saved on macOS (Accelerate); on OpenBLAS/MKL one case lands on another optimum. Now both versions are fitted on the same machine (current kernels vs the frozen 3298278 kernels), and only cases that are well-conditioned by a computed criterion (recovery and stability under a 1e-12 perturbation) are compared.test_ols_fit_with_a_factor_that_vanishes_finishes: the vanished weight's bound is now derived from the gram's kept condition number ((K - 1) eps cond) instead of a fixed 1e-8.Reproduced off-Mac in docker python:3.10 (scipy-openblas): the old test fails, the new ones pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ue9wuWfgA8yRXEuEiydTVh