Skip to content

Release 0.25 CI: platform-independent qf, doctests and checks - #985

Merged
derrynknife merged 1 commit into
devfrom
fix/release-ci
Oct 17, 2026
Merged

derrynknife merged 1 commit into
devfrom
fix/release-ci

Conversation

@derrynknife

Copy link
Copy Markdown
Owner

Fixes the failures in the first full run on the release PR (#984). None of them showed up locally on arm64 macOS.

  • Regression qf (test_571_qf_inverts_ff_for_every_family[LogNormalPH], py3.12/3.13).
    • Newton's finish rejected every step when the bracketed answer sat at an end of its bracket and the cumulative hazard's sign there flipped between batches. numpy 2.5.4's vectorised exp/log on Linux round the same time differently in a batch of another size.
    • So qf(0.9) kept the solver's 1.1e-12 error.
    • The fix widens the bracket by 1e-10·|t|; a step must still reduce |gap|.
    • Reproduced in Linux containers (arm64 and amd64) and fixed there; the error is now 4e-16.
  • test_828_qf_is_exact_near_the_start_of_the_support[NormalAH].
    • The check bounded ff(qf(s)) near an additive model's support start by 1e-8 of s. That is about two ulps of the terms H0 + x·β'Z, which cancel there, and x86-64 lands at 1.1e-8.
    • The bound is now 16 ulps of |H0(q)|, the limit any qf or ff has there. The largest seen is about 5 ulps, on mac, Linux arm64 and Linux amd64.
  • test_standard_errors_match_the_numerical_ones[NormalAH].
    • The exact SEs agree across platforms; it is the numerical reference that drifts: 1.05e-4 from the exact SEs on x86-64, 6.2e-5 on arm64.
    • NormalAH joins OLD_ROUNDING (2e-4), which also checks at ten times the step, where they agree to 6.7e-7.
  • Doctests (Parametric.plot, both plot_partial_effects).
    • CI runs doctests sequentially in one process, so an example drawing on plt.gca() drew on an earlier example's axes.
    • The root conftest now closes all figures before each doctest. Reproduced locally with a sequential run: 3 failed before, 805 passed after.
  • Refit calibration registry. WeibullJointPH was neither planned nor excluded. It is now excluded, because its own study is calibration/test_coverage_joint.py.

Local: regression + fast conformance 8462 passed; sequential doctests 805 passed; lint clean (pinned pre-commit isort and isort 9.0.2).

🤖 Generated with Claude Code

https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B

The release PR's first full run failed on things no local run on arm64
macOS showed:

- Regression qf: Newton's finish rejected every step when the bracketed
  answer sat at an end of its bracket and the cumulative hazard's sign
  there flipped between batches (numpy 2.5.4's vectorised exp/log on
  Linux round the same time differently in a batch of another size), so
  LogNormalPH's qf(0.9) kept the solver's 1.1e-12 error. The bracket is
  widened by 1e-10 of t; a step must still reduce |gap|. Reproduced and
  fixed in Linux containers (arm64 and amd64).
- test_828 bounded the error of ff(qf(s)) near an additive model's
  support by 1e-8 of s, about two ulps of the terms H0 + x beta'Z that
  cancel there; x86-64 rounds them to 1.1e-8. The bound is now 16 ulps
  of |H0(q)|, which is the limit any qf or ff has there (about 5 at most
  on either platform).
- NormalAH's numerical standard errors (the reference) are 1.05e-4 from
  the exact ones on x86-64, 6.2e-5 on arm64; it joins OLD_ROUNDING, whose
  check at ten times the step agrees to 6.7e-7.
- Doctests run one after another in one process in CI; three that draw
  on plt.gca() drew on an earlier example's axes. Every doctest now
  starts with no figure open (root conftest).
- The refit calibration registry neither planned nor excluded
  WeibullJointPH; it is excluded, its own study being
  calibration/test_coverage_joint.py.

The hooks also moved _prediction's Callable to collections.abc.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
@derrynknife
derrynknife merged commit b174915 into dev Oct 17, 2026
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