Skip to content

Test suite fails with jax >= 0.10: spurious FutureWarning from jax's internal cho_solve dispatch, escalated by filterwarnings = ["error"] #739

Description

Summary

With jax/jaxlib 0.10.x (conda-forge currently serves 0.10.2), 44 tests fail on an unmodified checkout of main (c2f7c24). This is not a dolphin regression: jax 0.10.0 added a deprecation warning that jax.scipy.linalg.solve(assume_a="pos") trips internally, and dolphin's pytest config (filterwarnings = ["error"]) escalates it to an error at trace time.

Evidence

CI run of unmodified main (c2f7c24) on my fork, same test-build-push.yml workflow: https://github.com/s-sasaki-earthsea-wizard/dolphin/actions/runs/31772307761

  • 44 failed / 702 passed / 19 skipped (test_phase_link_core, test_phase_link_compress, workflow tests)
  • Every failure's traceback ends the same way: _core.py:521 (process_coherence_matrices)crlb.py:187 (_crlb_from_x)jax/_src/scipy/linalg.py:170: FutureWarning
FutureWarning: jax.scipy.linalg.cho_solve: batched 1D solves with b.ndim > 1 are deprecated, and in the future will be treated as a batched 2D solve. Use cho_solve(c_and_lower, b[..., None]).squeeze(-1) to avoid this warning.

Any CI run whose environment resolves jax >= 0.10.0 will hit this (reproduced with 0.10.1 and 0.10.2); the last unaffected jax release is 0.9.2.

Root cause

crlb.py calls jax.scipy.linalg.solve(..., assume_a="pos") on batched matrices (crlb.py:187 on every CRLB computation; also crlb.py:178 when aps_variance > 0 and crlb.py:241 in compute_crlb_jax). Inside jax 0.10.x, _solve implements assume_a="pos" by vmapping an internal cho_solve(factors, x) over the RHS columns (linalg.py#L1196); the per-example rhs then has x.ndim == factors.ndim - 1, which is exactly the batched-1D dispatch that jax 0.10.0 deprecated (linalg.py#L164-L177) — so jax's own internal call emits the warning. User code never touches cho_solve; results are numerically correct; only the warning is spurious.

Dolphin's two direct cho_solve call sites are not affected (verified on 0.10.2): phase_link/_core.py:472 has equal-ndim c/b and takes the matrix branch; timeseries.py:1496 is vmapped with a per-pixel 1D rhs.

Options

  1. Targeted warning ignore (smallest diff, my suggestion): add to pyproject.toml's filterwarnings, following the existing h5py precedent:

    # jax >= 0.10 solve(assume_a="pos") trips its own cho_solve deprecation
    # warning internally; remove once fixed upstream in jax:
    "ignore:jax.scipy.linalg.cho_solve. batched 1D solves.*:FutureWarning",

    Keeps CI on latest jax, no behavior change, self-documenting removal condition.

  2. Avoid the warning at the source: replace the assume_a="pos" calls in crlb.py with explicit cho_factor + cho_solve on the matrix RHS (the non-deprecated branch). Numerically identical; would forgo custom_linear_solve's factorization reuse under differentiation, which the CRLB path doesn't appear to use.

  3. Pin jax<0.10: least attractive — that walks back three minor releases and the warning is still present on jax main, so the pin would linger.

Happy to open the small PR for option 1 (or 2), and/or to file this upstream with jax as a minimal-repro issue — your call.


Disclosure: AI tools assisted with research, implementation, and drafting. I verified the technical claims and take responsibility for the proposal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions