Skip to content

profiling(PyAutoArray#575): interferometer MGE breakdown on the library W~ route — CPU + A100 - #313

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/interferometer-mge-w-tilde-route
Sep 26, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/interferometer-mge-w-tilde-route

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

This is the workspace half of PyAutoArray#575: the MGE breakdown cell re-run on the library W~ route (lever 1 of #308). With the library PRs applied, an MGE-only FitInterferometer on a dataset with apply_sparse_operator() uses InversionInterferometerSparse, and the full likelihood matches dense to 0.0 nats wherever a dense reference exists. Where the old library path ran out of A100 memory, it now runs:

Leg library full pipeline dense
alma CPU 34.7 ms 13.10 s
alma A100 2.69 ms OOM (61.4 GiB); chunked 940 ms
alma_high A100 19.6 ms (not re-run with the zero-NUFFT fix) OOM (300 GiB); chunked 3.94 s
jvla A100 16.7 ms OOM (1.46 TiB); chunked 24.2 s

The library route runs within 1.2–1.4x of the measurement-only W~ chain from #308. The MGE + lens Sersic variant matches dense exactly; with the dirty-image correction switched off it is 779 nats off at alma. Two measurement rounds are recorded: round 2 includes the zero-image NUFFT fix that was folded into PyAutoGalaxy#629 and PyAutoLens#750.

Not run:

  • CPU alma_high: the laptop ran out of memory (10.8 GB) in the eager apply_sparse_operator() build. This is recorded as a finding.
  • CPU jvla.
  • The jvla batch of 64 still runs out of memory (41.1 GiB). By size, the likely cause is the W~ curvature FFT; this is inferred, not profiled. VMAP_BATCH_SPARSE stays at 16 for jvla.

Scripts Changed

  • scripts/interferometer/likelihood_breakdown/mge.py: new --sparse library W~ route arm (and --sparse-vmap-batch). It records the inversion class, library steps and jit phases alongside the dense rows (dense_steps), plus the witness and an MGE + lens Sersic variant; outputs get a _sparse suffix. Existing arms are unchanged.
  • hpc/batch_gpu/submit_breakdown_interferometer_mge_a100_{alma,alma_high,jvla}_fp64_sparse: new A100 submits.
  • scripts/misc/vram/config.py: new VMAP_BATCH_SPARSE rows (alma 64, alma_high 64, jvla 16). The dense rows stay None, with a comment saying why.
  • results/breakdown/interferometer/**/*_sparse.{json,png}, the "Library W~ route (2026-09-26)" section of results/notes/interferometer_mge_breakdown_2026_09.md, and the regenerated READMEs.

Upstream PR

(Library-first: merge these three before this PR.)

Test Plan

  • build_readme.py --check, ruff check, ruff format --check, check_submits.py --check
  • pytest scripts/misc/test/: 912 passed, 5 skipped
  • CPU sma/alma legs on the branch libs (__file__ and source_revisions recorded); RAL A100 jobs 356359–356363 completed with clean logs, branch libs asserted, zero fp32 truncations
  • Heart at ship: YELLOW (manifest drift: hub organism blurb (organs present) — 7 mismatch(es) vs PyAutoMind/repos.yaml; manifest drift: organism-map blocks (generated) — 1 mismatch(es) vs PyAutoMind/repos.yaml), unrelated to this repo. The human authorized shipping this PR on 2026-09-26.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits September 26, 2026 13:04
…se submits (PyAutoArray#575)

The MGE breakdown cell gains a --sparse arm that fits through the library on a
dataset with apply_sparse_operator() applied, which since PyAutoArray#575 takes
InversionInterferometerSparse for an MGE-only model. Steps/jit_phases in the
dense schema, jitted FitInterferometer log_likelihood vs the dense reference
(witness |dlogL| <= 1e-6), an MGE + lens Sersic variant with an uncorrected
control, and a small sparse vmap probe. Dense and W~ arms kept (before/after in
one JSON); outputs carry the _sparse suffix. The A100 submits prepend a private
copy of the branch libraries to PYTHONPATH and assert the import location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…VRAM sparse rows (PyAutoArray#575)

CPU sma/alma and A100 alma/alma_high/jvla (RAL 356359-356361) on the #575
branch libraries: MGE-only fits take InversionInterferometerSparse; |dlogL| vs
the dense reference 0.0 nats (CPU sma/alma; A100 vs CPU pins); A100 full
pipeline 8.9 / 19.6 / 92.2 ms where the dense library path OOMs. MGE + lens
Sersic sparse == dense (uncorrected control 779 nats off at alma).
VMAP_BATCH_SPARSE gains interferometer mge alma 64, alma_high 64, jvla 16.
Note addendum 'Library W~ route (2026-09-26)'; README dashboards regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…age NUFFT fix (PyAutoArray#575)

PyAutoGalaxy 36d1b436 / PyAutoLens ac333b17 skip the Fourier transform of the
all-zero standard-light image when there is no ordinary light. Re-ran CPU
sma/alma and A100 alma/jvla (RAL 356362, 356363): full pipeline alma CPU
1.29 s -> 34.7 ms, alma A100 8.92 -> 2.69 ms, jvla A100 92.2 -> 16.7 ms; witness
unchanged (|dlogL| 0.0 nats). jvla vmap 64 still asks 41.1 GiB, so the
VMAP_BATCH_SPARSE jvla row stays 16 and its comment is corrected. Note section
updated with round 1 / round 2 before/after; README dashboards regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 26, 2026
@Jammy2211
Jammy2211 merged commit 6c45fec into main Sep 26, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/interferometer-mge-w-tilde-route branch September 26, 2026 15:33
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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.

1 participant