Skip to content

Check both pixelization log determinants in Lens imaging guards - #370

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/pr504-sibling-guards
Nov 23, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/pr504-sibling-guards

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Check the inversion’s regularization and curvature log determinants directly. Both can contribute even when their net effect on the fit score nearly cancels. Companion to PyAutoLabs/autogalaxy_workspace_test#138. Closes #369.

Scripts Changed

  • scripts/imaging/_pixelization_guard.py checks the inversion and both determinant terms.
  • scripts/imaging/model_fit.py uses the shared guard.
  • scripts/imaging/visualization/modeling_visualization_rectangular_jit.py and scripts/imaging/visualization/modeling_visualization_delaunay_jit.py use the guard for CPU and JAX fits.

Test Plan

The cancellation fixture passed with a 0.80-nat net gap and terms of 122.67 and 131.46. The guard rejected a missing inversion and either zero term. The imaging model-fit script passed end to end, and both full-resolution visualization scripts passed their CPU and JAX likelihood guards. Targeted Delaunay smoke passed. Independent pre-ship review returned CLEAN.

Known JIT timing failures

Both full-resolution visualization scripts then failed their separate assertion that the cached call takes less than half the first call’s time.

Mesh First call Cached call
Rectangular 1.176 s 1.207 s
Delaunay 4.900 s 4.792 s

The independent reviewer reproduced both failures on main. Both scripts already have NEEDS_FIX entries in config/build/no_run.yaml. The timing assertions remain enabled. The maintainer approved opening this PR with these failures documented.

@Jammy2211
Jammy2211 merged commit 48f4095 into main Nov 23, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/pr504-sibling-guards branch November 23, 2026 17:12
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.

fix: check inversion terms in sibling imaging guards

1 participant