Skip to content

Update source_plane regression to Richardson-converged truth#24

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/lens-calc-hessian-richardson
Apr 18, 2026
Merged

Update source_plane regression to Richardson-converged truth#24
Jammy2211 merged 1 commit into
mainfrom
feature/lens-calc-hessian-richardson

Conversation

@Jammy2211
Copy link
Copy Markdown
Contributor

Summary

The library-side Richardson extrapolation in LensCalc.hessian_from (PyAutoGalaxy#358) closes the prior ~0.1% np/jnp log-likelihood divergence in the source-plane point-source pipeline. This PR updates the regression assertion to the new converged truth and tightens the tolerance.

Scripts Changed

  • jax_profiling/point_source/source_plane.py — updated EXPECTED_LOG_LIKELIHOOD_SOURCE_PLANE to -4491.83220547254 (Richardson-converged), tightened JIT regression rtol from 2e-3 to 1e-4, removed annotations referencing the pre-fix np/jnp divergence
  • jax_profiling/point_source/results/{source,image}_plane_summary_v2026.4.13.6.{json,png} — regenerated artifacts

Upstream PR

PyAutoLabs/PyAutoGalaxy#358

Test Plan

  • Eager regression assertion passes: log_likelihood matches -4491.832205
  • JIT regression assertion passes at rtol=1e-4: log_likelihood matches -4491.832205
  • Smoke tests pass for affected workspace

🤖 Generated with Claude Code

EXPECTED_LOG_LIKELIHOOD_SOURCE_PLANE updated to -4491.83220547254
(np and jnp now agree). JIT regression rtol tightened from 2e-3
to 1e-4. Removed annotations referencing the pre-fix np/jnp
divergence. Regenerated result JSON/PNG artifacts.

Upstream PR: PyAutoLabs/PyAutoGalaxy#358
@Jammy2211 Jammy2211 added the pending-release Pending release build label Apr 18, 2026
@Jammy2211 Jammy2211 merged commit d5b8138 into main Apr 18, 2026
@Jammy2211 Jammy2211 deleted the feature/lens-calc-hessian-richardson branch April 18, 2026 22:06
Jammy2211 pushed a commit that referenced this pull request May 11, 2026
Lens light: single Sersic → MGE-60 (60 linear Gaussians) in both
canonical refs (jax_profiling/jit/imaging/{pixelization,delaunay}.py)
and corresponding result artifacts. The MGE columns enter the
inversion mapping matrix, growing F+H from NxN to (N+60)x(N+60).

EXPECTED_LOG_EVIDENCE_HST recomputed:
- Pixelization (1225 + MGE-60): 24746.105672366088 (was 25918.026 single-Sersic)
- Delaunay (1231 + MGE-60):     26288.321397232066 (was 27433.903)

Configs shipped:
- Rectangular: 6 (CPU+GPU x fp64+mp, A100 fp64+mp) — full coverage
- Delaunay:    4 (GPU fp64+mp, A100 fp64+mp) — local CPU still hangs (Task #24)

Companion z_projects/profiling commit on local main updates
_setup_pixelization.py + _setup_delaunay.py to MGE-60, fixes
pixelization_profile.py to use eager-extracted H from inversion (the
old source-only constant_regularization_matrix_from gave a (N,N) shape
that mismatched F's (N+60,N+60) when lens is linear-MGE), and adds
delaunay_vmap_probe.py + rectangular_vmap_probe.py for per-step
vmap/single decomposition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Jammy2211 added a commit that referenced this pull request May 11, 2026
…231 src + MGE-60 lens) (#60)

* profiling: re-run rectangular + Delaunay at ~1250 source pixel science fiducial

Bumps mesh sizes:
- Rectangular: 28x28 = 784 → 35x35 = 1225 source pixels
- Delaunay: 26x26 Overlay = 570 vertices → 39x39 Overlay = 1231 vertices

EXPECTED_LOG_EVIDENCE_HST recomputed:
- Rectangular: 25918.02569499014 (was 26232.07)
- Delaunay: 27433.90296505439 (was 29179.95)

Both canonical references in jax_profiling/jit/imaging/{pixelization,
delaunay}.py and the result artifacts under jax_profiling/results/jit/
imaging/ have been updated together so canonical and per-config stay
aligned at the new fiducial.

Configs shipped:
- Rectangular: 6 (CPU+GPU x fp64+mp, A100 fp64+mp) — full coverage
- Delaunay:    4 (GPU fp64+mp, A100 fp64+mp) — local CPU configs hang

local_cpu_fp64 + local_cpu_mp for Delaunay at 1231 vertices both hang
indefinitely at full_pipeline_first_call after compile succeeds.
Identical futex_wait_queue_me signature for both precisions —
extends Task #24 (was thought to be mp-specific; size-related).
Rectangular CPU configs at 1225 work fine. PR ships Delaunay without
CPU rows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* profiling: bump rect + Delaunay sweeps to MGE-60 lens fiducial

Lens light: single Sersic → MGE-60 (60 linear Gaussians) in both
canonical refs (jax_profiling/jit/imaging/{pixelization,delaunay}.py)
and corresponding result artifacts. The MGE columns enter the
inversion mapping matrix, growing F+H from NxN to (N+60)x(N+60).

EXPECTED_LOG_EVIDENCE_HST recomputed:
- Pixelization (1225 + MGE-60): 24746.105672366088 (was 25918.026 single-Sersic)
- Delaunay (1231 + MGE-60):     26288.321397232066 (was 27433.903)

Configs shipped:
- Rectangular: 6 (CPU+GPU x fp64+mp, A100 fp64+mp) — full coverage
- Delaunay:    4 (GPU fp64+mp, A100 fp64+mp) — local CPU still hangs (Task #24)

Companion z_projects/profiling commit on local main updates
_setup_pixelization.py + _setup_delaunay.py to MGE-60, fixes
pixelization_profile.py to use eager-extracted H from inversion (the
old source-only constant_regularization_matrix_from gave a (N,N) shape
that mismatched F's (N+60,N+60) when lens is linear-MGE), and adds
delaunay_vmap_probe.py + rectangular_vmap_probe.py for per-step
vmap/single decomposition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Jammy2211 <JNightingale2211@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release Pending release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant