feat: interferometer mge_gradients + regression assertions across jax_profiling#20
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jax_profiling/interferometer/mge_gradients.py(mirrors the imaging counterpart). 9/9 PASS on stock library defaults — noDIAG_VALUE_OVERRIDE=1.0workaround needed once PyAutoArray#283 lands.DIAG_VALUE_OVERRIDE=1.0research override from the script; it's pinned back to stock1e-3.imaging/simulators/imaging.pywithnoise_seed=1so the HST dataset is deterministic (matches the existing seeded interferometer simulator).Regression assertions
imaging/mge.pylog_likelihood = -159736.355042(HST)imaging/pixelization.pylog_evidence = -1.338521802e9(HST)imaging/delaunay.pylog_evidence = -1.802826963e9(HST)interferometer/mge.pylog_likelihood = -3154.805357(SMA)interferometer/pixelization.pylog_evidence = -3168.346563(SMA)imaging/mge_gradients.pyinterferometer/mge_gradients.pyContext
Depends on: PyAutoLabs/PyAutoArray#283 (tightens
nnls_target_kappadefault to1e-11, which is what lets the interferometer gradient probes pass on stock defaults)Closes #19
Test plan
should_simulate=Falsewith the deterministic values🤖 Generated with Claude Code