Repository navigation
fix: likelihood-breakdown cells use the #682 pseudo-determinant ln det H; re-pin (#525) - #526
Merged
Merged
Conversation
…t H (#525) Shared helpers in reconstruction_steps: grounding_from(inversion) -> (keep, sum log P_b) resolved eagerly, and log_det_regularization_from(reg_reduced, grounding) -> the library's ln det(H). Every cell-side ln det(H) now uses them: the inline compute_log_evidence of imaging/{rectangular,delaunay, delaunay_nn} and datacube/delaunay (dense + sparse), their timed log_det_regularization_jit rows, sparse_steps.log_evidence (via SparseContext.reg_grounding), the raw log_evidence_terms calls, and matrix_free (exact log det, scorer call, SLQ on the grounded subspace plus sum log P_b). #524's FixedLightSystem / log_evidence_terms_np move to the (keep, offset) form; the JAX-free builder keeps a numpy copy pinned to the helper by test_pdet_grounding.py (also pins the helper to AbstractInversion.log_det_regularization_matrix_term and runs it under jit). Pins are re-measured in a follow-up commit from the RAL array added here (submit_likelihood_breakdown_pdet_repin_ral_cpu_fp64). pytest scripts/misc/*/test: 1907 passed, 6 skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured by RAL job 414743 (ral, CPU fp64, private library mains incl. #682). On every run the cell's own grounded evidence equals the library's (log_evidence (inv matrices) == reference; datacube sparse cube assertion PASSED). - delaunay: constant_split 29120.1328, adapt_split 29164.2105 - delaunay_nn: constant_split 29153.7935 (+9.21, #682 alone), adapt_split 29358.1182 - rectangular: bilinear 28631.6052, rtu 28515.5316 - matrix_free PINNED_LOG_DETS (both log dets, all three meshes) - datacube sma per-channel pin -3160.43901 (previously unpinned) Besides #682, the shifts carry library changes since the previous pins. Co-Authored-By: Claude Opus 5.5 <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
Fixes #525, the remainder of #523. Since PyAutoArray#682 the library's
ln det His a pseudo-determinant for the smoothness regularizations. The per-likelihood breakdown cells still computed the old value, and their pinned regression evidences were broken.reconstruction_steps.grounding_from(inversion)resolves(keep, Σ log P_b)once, eagerly, andlog_det_regularization_from(reg_reduced, grounding)does the library's arithmetic. Every cell-sideln det Hnow goes through them:compute_log_evidenceofimaging/{rectangular,delaunay,delaunay_nn}anddatacube/delaunay(dense and sparse);log_det_regularization_jitrows;sparse_steps.log_evidence, viaSparseContext.reg_grounding;log_evidence_termscalls;matrix_free: the exact log det, the scorer call, and SLQ, which now runs on the grounded subspace and addsΣ log P_b.FixedLightSystem,log_evidence_terms_np) moves to the same(keep, offset)form. The JAX-free system builder keeps a NumPy copy, pinned to the shared helper by a test.ral, CPU fp64, private library checkout at today's mains including #682). On every run the cell's own evidence equals the library's (log_evidence (inv matrices) == reference, to 1e-15 relative; datacube sparse cube assertion PASSED).ln det H+18.42 = ln 1e8, exactly)Most shifts are larger than #682's 9.21. They also carry library changes since the previous pins, which went unnoticed: main's lint runs had been cancelled, and some pins only record drift rather than fail.
Scripts Changed
scripts/misc/likelihood_breakdown/reconstruction_steps.py:grounding_from,log_det_regularization_from;log_evidence_termsuses them.scripts/misc/likelihood_breakdown/sparse_steps.py:SparseContext.reg_grounding;log_evidenceuses it.scripts/misc/likelihood_breakdown/fixed_light_system.py,fixed_light_cpu_common.py:(keep, offset)grounding; JAX-free_grounding_from.scripts/imaging/{rectangular,delaunay,delaunay_nn}/likelihood_breakdown.py,scripts/datacube/delaunay/likelihood_breakdown.py:REG_GROUNDING, grounded evidence and timed rows, re-pins.scripts/imaging/pixelized/matrix_free.py: grounded exact log det, scorer and SLQ; re-pinnedPINNED_LOG_DETS.scripts/misc/likelihood_breakdown/test/test_pdet_grounding.py(new): helper vsAbstractInversion.log_det_regularization_matrix_term, NumPy copy vs helper, runs under jit.hpc/batch_cpu/submit_likelihood_breakdown_pdet_repin_ral_cpu_fp64(new): the re-pin array.Test plan
pytest scripts/misc/*/test: 1907 passed, 6 skipped (on c8a12b5; the re-pin commit touches pins only).ruff check ./ruff format --check .; all 12 generated-surface lint checks on a clean tree.linton this PR.Heart RED override (development only)
Authorization. The live human answered the gate question for #525 with "Override + RAL validation" (2026-11-09). That covers development shipping and the RAL CPU array. Merging needs a separate human
/prmwith every required check green. This does not release anything, bypass any check, or claim to fix Heart.RED reasons at ship (
heart_feed.py, verbatim):Tier: judge. Merge mode: human
/prm.Closes #525
🤖 Generated with Claude Code