Skip to content

feat: interferometer mge_gradients + regression assertions across jax_profiling#20

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-mge-gradients
Apr 18, 2026
Merged

feat: interferometer mge_gradients + regression assertions across jax_profiling#20
Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-mge-gradients

Conversation

@Jammy2211
Copy link
Copy Markdown
Contributor

Summary

  • Adds jax_profiling/interferometer/mge_gradients.py (mirrors the imaging counterpart). 9/9 PASS on stock library defaults — no DIAG_VALUE_OVERRIDE=1.0 workaround needed once PyAutoArray#283 lands.
  • Removes the DIAG_VALUE_OVERRIDE=1.0 research override from the script; it's pinned back to stock 1e-3.
  • Seeds imaging/simulators/imaging.py with noise_seed=1 so the HST dataset is deterministic (matches the existing seeded interferometer simulator).
  • Adds absolute-value regression assertions to the 7 realistic-size scripts so a single bad commit can't silently regress log-likelihoods or gradient finiteness.

Regression assertions

Script Expected
imaging/mge.py log_likelihood = -159736.355042 (HST)
imaging/pixelization.py log_evidence = -1.338521802e9 (HST)
imaging/delaunay.py log_evidence = -1.802826963e9 (HST)
interferometer/mge.py log_likelihood = -3154.805357 (SMA)
interferometer/pixelization.py log_evidence = -3168.346563 (SMA)
imaging/mge_gradients.py 9/9 gradient steps finite
interferometer/mge_gradients.py 9/9 gradient steps finite

Context

Depends on: PyAutoLabs/PyAutoArray#283 (tightens nnls_target_kappa default to 1e-11, which is what lets the interferometer gradient probes pass on stock defaults)

Closes #19

Test plan

  • Merge PyAutoArray#283 first
  • All 7 scripts run locally end-to-end with the new assertions on κ=1e-11
  • HST data.fits / noise_map.fits re-simulated with seed=1 committed so future fresh clones hit should_simulate=False with the deterministic values

🤖 Generated with Claude Code

… jax_profiling

Adds absolute-value numerical assertions to the 7 jax_profiling scripts
that run realistic-sized datasets, so any future regression in
log-likelihood or gradient finiteness is caught immediately.

Changes:

- Add jax_profiling/interferometer/mge_gradients.py mirroring the imaging
  counterpart. Achieves 9/9 PASS on stock library defaults (requires
  the nnls_target_kappa=1e-11 change in PyAutoArray#283; no workaround
  needed anymore).
- Remove DIAG_VALUE_OVERRIDE=1.0 workaround from interferometer/mge_gradients.py.
- Seed imaging/simulators/imaging.py with noise_seed=1 so the HST dataset
  used by the assertions is deterministic. Re-simulate dataset/imaging/hst/.
- Add log-likelihood regression assertions to:
    imaging/mge.py                   -> -159736.355042 (HST)
    imaging/pixelization.py          -> -1.338521802e9 (HST)
    imaging/delaunay.py              -> -1.802826963e9 (HST)
    interferometer/mge.py            -> -3154.805357 (SMA)
    interferometer/pixelization.py   -> -3168.346563 (SMA)
- Add gradient-finiteness regression assertions to:
    imaging/mge_gradients.py         -> 9/9 steps PASS
    interferometer/mge_gradients.py  -> 9/9 steps PASS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit 200dfaf into main Apr 18, 2026
@Jammy2211 Jammy2211 deleted the feature/interferometer-mge-gradients branch April 18, 2026 07:10
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.

feat: interferometer JAX gradient probes — MGE

1 participant