Skip to content

hazards: SLaM MGE NNLS capture for PyAutoArray#571 - #307

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/mge-pdip-nnls-convergence
Sep 24, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/mge-pdip-nnls-convergence

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Capture script (scripts/imaging/hazards/mge_nnls_capture.py) for the failing (Q, q) systems behind PyAutoArray#571: the SLaM source_lp[1] MGE model evaluated at 48 near-truth parameter vectors, recording the JAX PDIP convergence per system alongside the NumPy fnnls_cholesky reference.

  • Pre-fix JSON (results/.../nnls_capture_slam_hst_v2026.8.17.1.json): 14/48 unconverged at the library's max_iter=50.
  • Post-fix JSON (..._postfix.json, run against the fixed PyAutoArray branch): 0/48 unconverged, max |logL_jax - logL_numpy| = 5.6e-7.
  • The captured .npz fixture (8 SLaM systems) is copied into PyAutoArray's test tree as the regression fixture.

Depends on: PyAutoLabs/PyAutoArray#572 (this repo's CI checks out PyAutoArray main, so the post-fix capture only reproduces once that PR is merged; opened as a draft until then). The script's module-level imports exist on PyAutoArray main and the AUTOLENS_PROFILING_SMOKE=1 exit precedes all fix-only usage; ruff check, ruff format --check and build_readme.py --check pass locally.

Heart RED development override

Heart is RED at ship time for reasons unrelated to this branch. Exact reasons from pyauto-heart readiness on 2026-09-24:

  • release validation FAILED (stage integrate)
  • workspace validation not passing (4 failed, cloud#35579888156: autolens notebooks/cluster/modeling.ipynb, autolens notebooks/weak/a2744.ipynb, autolens scripts/cluster/modeling.py, +1 more)
  • manifest drift: hub organism blurb (organs present) — 7 mismatch(es) vs PyAutoMind/repos.yaml

Branch gates passed: full suite 1681 passed; regression fixture green; capture 0/48; pins ≤ 2.5e-11. Human authorisation, given live in the session in reply to the override request naming #571: "I authorise you to continue". Permits commit/push/PR-open only; merge requires a separate /prm with green checks. This branch does not repair Heart.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WAqZd1NiPsVYPSAP8tX4YL

Jammy2211 and others added 2 commits September 24, 2026 16:58
New scripts/imaging/hazards/mge_nnls_capture.py records the exact
(curvature_reg_matrix, data_vector) the JAX likelihood passes to
reconstruction_positive_only_from for the SLaM source_lp[1] MGE model
(60 linear columns) at 48 seeded near-truth vectors, and scores the
Jacobi-preconditioned PDIP solve at caps 50/200 against fnnls_cholesky.
Result: 14/48 hit the 50-iteration cap with wrong log-likelihoods, 5/48
never converge in 200. Writes the per-vector summary JSON and an 8-system
compressed .npz fixture (158 KB) for the PyAutoArray regression test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mge_nnls_capture.py now records what the library's own JAX solve reports
(stats converged / iterations / preconditioning, surfaced by the
PyAutoArray#571 fix) and takes --label for a summary-only re-run. Against the
fixed library (mapper-less inversions use the raw-forward PDIP mode) the 48
SLaM source_lp[1] vectors give 0/48 unconverged solves (16-19 iterations) and
a JAX vs NumPy log-likelihood difference of at most 5.6e-7. Previously 14/48
were wrong. Both summaries are described in the hazards README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WAqZd1NiPsVYPSAP8tX4YL
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 24, 2026
@Jammy2211
Jammy2211 marked this pull request as ready for review September 24, 2026 18:18
@Jammy2211
Jammy2211 merged commit 00211d3 into main Sep 24, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/mge-pdip-nnls-convergence branch September 24, 2026 18:18
@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