isce-framework / isce-framework/dolphin
Test suite fails with jax >= 0.10: spurious FutureWarning from jax's internal `cho_solve` dispatch, escalated by `filterwarnings = ["error"]`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 153
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
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
-
Targeted warning ignore (smallest diff, my suggestion): add to
pyproject.toml'sfilterwarnings, 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.
-
Avoid the warning at the source: replace the
assume_a="pos"calls incrlb.pywith explicitcho_factor+cho_solveon the matrix RHS (the non-deprecated branch). Numerically identical; would forgocustom_linear_solve's factorization reuse under differentiation, which the CRLB path doesn't appear to use. -
Pin
jax<0.10: least attractive — that walks back three minor releases and the warning is still present on jaxmain, 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pyproject.toml at the filterwarnings configuration and review the existing h5py precedent and the proposed JAX warning pattern. Run the affected tests, including test_phase_link_core, test_phase_link_compress, and workflow tests, with JAX 0.10.x; done means the spurious FutureWarning no longer turns these tests into failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100