Summary
On clean main (autolens_workspace_developer@4e99bf9, PyAutoLens 2026.5.14.2), jax_profiling/jit/imaging/delaunay.py crashes its self-consistency check at the log_evidence step: both the step-by-step rebuild and the inv-matrices rebuild return -inf, while the eager FitImaging.log_evidence reference returns a finite, expected 26288.32. The bug is in the rebuild, not in FitImaging.
Surfaced by the autolens_profiling Phase 1 follow-up smoke (issue #67); split out of that triage because it's an independent numerical / underflow bug not related to the point_source regression drift.
Reproduction
cd autolens_workspace_developer
source ../activate.sh
python jax_profiling/jit/imaging/delaunay.py
Output (relevant tail)
--- Step 13: Mapped reconstruction + log evidence ---
[log_evidence_eager] 0.5566 s
[log_evidence_jit_lower] 0.0364 s
[log_evidence_jit_compile] 0.2256 s
[log_evidence_jit_first_call] 0.1473 s
[log_evidence_jit_steady_x10] 1.2660 s
-> per-call avg: 0.126602 s
log_evidence (step-by-step) = -inf
log_evidence (inv matrices) = -inf
log_evidence (reference) = 26288.321397232066
Traceback (most recent call last):
File ".../jax_profiling/jit/imaging/delaunay.py", line 833, in <module>
np.testing.assert_allclose(
AssertionError:
Not equal to tolerance rtol=0.0001, atol=0
Log_evidence from inversion matrices does not match FitImaging.log_evidence
-inf location mismatch:
ACTUAL: array(-inf)
DESIRED: array(26288.321397)
Diagnosis hint
FitImaging.log_evidence (the high-level path) produces a sensible finite number.
- Both the step-by-step rebuild and the inv-matrices rebuild produce
-inf.
- That means the bug is in one of the building-block computations the script calls directly (regularization-determinant term, NNLS-residual term, or curvature-determinant term), not in
FitImaging itself.
- The earlier steps (data vector, curvature matrix, regularization matrix, reconstruction, mapped reconstruction) all produce finite results with sensible shapes — only the final
log_evidence aggregation goes to -inf.
Most likely culprits:
log / slogdet of a near-singular matrix returning -inf from the JAX path under xp=jnp.
- Negative argument to
xp.log somewhere in the Bayesian-evidence aggregation.
- The same expression on the eager
xp=np path is benefiting from numpy's slight numerical-noise tolerance.
Context
- All other JIT scripts on clean main behave consistently:
interferometer/delaunay.py passes on the same Delaunay pixelization with the same regularization (ConstantSplit), so the imaging-specific Delaunay log_evidence rebuild is the narrow culprit.
Related
Summary
On clean
main(autolens_workspace_developer@4e99bf9, PyAutoLens 2026.5.14.2),jax_profiling/jit/imaging/delaunay.pycrashes its self-consistency check at the log_evidence step: both the step-by-step rebuild and the inv-matrices rebuild return-inf, while the eagerFitImaging.log_evidencereference returns a finite, expected26288.32. The bug is in the rebuild, not inFitImaging.Surfaced by the
autolens_profilingPhase 1 follow-up smoke (issue #67); split out of that triage because it's an independent numerical / underflow bug not related to the point_source regression drift.Reproduction
Output (relevant tail)
Diagnosis hint
FitImaging.log_evidence(the high-level path) produces a sensible finite number.-inf.FitImagingitself.log_evidenceaggregation goes to-inf.Most likely culprits:
log/slogdetof a near-singular matrix returning-inffrom the JAX path underxp=jnp.xp.logsomewhere in the Bayesian-evidence aggregation.xp=nppath is benefiting from numpy's slight numerical-noise tolerance.Context
imaging/mge.py,interferometer/{mge,pixelization,delaunay}.py,datacube/delaunay.py— PASS.imaging/pixelization.py— crashes with mapping-matrix shape mismatch (separate issue).point_source/{image_plane,source_plane}.py— drift in regression constants (triaged in triage: drift in jit/ regression constants (autolens_profiling F1) #67).interferometer/delaunay.pypasses on the same Delaunay pixelization with the same regularization (ConstantSplit), so the imaging-specific Delaunay log_evidence rebuild is the narrow culprit.Related