Skip to content

Loosen kap/mle regression gate to hardware-reproducible tolerance - #28

Merged
e-baumer merged 1 commit into
masterfrom
fix-kap-mle-gate-tolerance
Aug 12, 2026
Merged

Loosen kap/mle regression gate to hardware-reproducible tolerance#28
e-baumer merged 1 commit into
masterfrom
fix-kap-mle-gate-tolerance

Conversation

@e-baumer

Copy link
Copy Markdown
Owner

Fixes the test (3.13) failure on the master CI run after #27 merged.

Not a Python 3.13 issue: the identical commit passed 3.13 on the PR run. The kap-mle regression test compares against golden values at rel=1e-9, but scipy's kappa4 MLE optimizer lands on the same optimum with hardware-dependent floating-point drift of ~1e-7 across runner CPU types (max abs diff on the failing run: 2.6e-7).

This gives that one combination an abs=1e-5 tolerance — still far below the 1e-3+ shift any genuine numerical change produces — and keeps every other (distribution, fit) combination at rel=1e-9. Documented inline in the test module.

scipy's kappa4 MLE converges to the same optimum with ~1e-7 floating-point
drift across CPU types: the identical commit passed the 1e-9 gate on the PR
runner and failed it on the master push runner (max abs diff 2.6e-7,
kap/mle only). Give that one combination an abs=1e-5 tolerance - still far
below the 1e-3+ shift any real numerical change produces - and keep every
other combination at rel=1e-9.
@e-baumer
e-baumer merged commit 79134cc into master Aug 12, 2026
5 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