Repository navigation
fix: regenerate rectangular-mesh constants and un-park the jax_grad gradient check - #280
Conversation
…radient check
Follows PyAutoArray#490, which corrects mirrored bilinear row weights and a
round-off-dependent cell assignment in the adaptive rectangular mapper. That
changes reconstructions for every adaptive rectangular mesh, so the hardcoded
assertion constants for those scripts move.
MERGE AFTER PyAutoArray#490 — these constants are wrong against a library that
does not yet carry the fix.
Every constant here was regenerated from measurement, and only for scripts
confirmed to PASS on the pre-fix build and FAIL on the fixed one, so each change
is attributable to #490 rather than to pre-existing breakage. A full 16-script
paired sweep (fixed build vs a venv pinned to main's interpolator) gave:
8 regenerate passed before, moved by the fix
6 unchanged pass on both builds - all four interferometer/jax_likelihood
rectangular scripts, misc/jax_assertions/sparse_operators and
interferometer/datacube/rectangular are untouched
2 skipped imaging/jax_likelihood/rectangular_{mge,mge_rtu} hang to the
timeout on BOTH builds (the known jax vmap compile stall), so
they were never regenerated from a run that did not complete
The un-parked entry: interferometer/jax_grad/gradient.py was NEEDS_FIX for an
eager/jit divergence attributed to pure_callback constant-folding on Python 3.13.
Both attributions were wrong (autolens_workspace_test#279). 3.12 reproduces the
failure identically on the same host, so the CI split was runner hardware, not
CPython; and pure_callback is structurally absent from that path. The cause was
the mapper defect #490 fixes. With it, the script is green on both legs, all four
variants, with assert_eager_jit_consistent left untouched at rtol=1e-10 and an
eager/jit gap of exactly 0.0 (3.13 83s, 3.12 86s against the 300s cap).
Verified: all nine touched/un-parked scripts exit 0 against the fixed library.
Refs PyAutoLabs/PyAutoArray#490
Closes #279
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016azuS2UbS3mFvfxkDFGsKj
|
CI on the first run went red on one script — this is the library-first ordering, not a content failure, and it is now resolvable. Failing check: Why it is not this PR's content. Corroborating, from the same run:
The upstream fix is now merged. Re-running the failed jobs now. That is the single re-run this warrants; if it fails again the failure is real and I will treat it as such rather than re-running further. Generated by Claude Code |
Closes #279.
What this is
#490 corrects mirrored bilinear row weights and a round-off-dependent cell assignment in the adaptive rectangular mapper. That changes reconstructions for every adaptive rectangular mesh, so the hardcoded assertion constants for the affected scripts move. This regenerates them and un-parks the script that surfaced the bug.
Every constant regenerated from measurement, and only where attributable
A full 16-script paired sweep — the fixed build against a venv pinned to
main's interpolator — so each change is known to be caused by #490 rather than by pre-existing breakage:interferometer/jax_likelihood/rectangular*,misc/jax_assertions/sparse_operators,interferometer/datacube/rectangularimaging/jax_likelihood/rectangular_{mge,mge_rtu}hang to the timeout on both builds (the known jax vmap compile stall)The two skipped scripts matter: they never completed on either build, so regenerating their constants from a run that did not finish would have baked in a value nothing verified. They are left untouched, and are pre-existing — not caused by this change.
imaging/jax_likelihood/rectangular.pyimaging/jax_likelihood/rectangular_rtu.pyimaging/jax_likelihood/rectangular_dspl.pyimaging/jax_likelihood/rectangular_dspl_rtu.pymulti_dataset/jax_likelihood/rectangular.pymulti_dataset/jax_likelihood/rectangular_rtu.pymulti_dataset/jax_likelihood/rectangular_mge.pymulti_dataset/jax_likelihood/rectangular_mge_rtu.pyShifts go in both directions. That is expected rather than alarming: with a pixelized source the inversion solves for the source values, so the mapping is a basis, not a prediction, and the figure of merit at an unfitted model point is not a correctness signal. The correctness evidence is in #490 — linear reproduction, continuity, convergence under refinement, and ground-truth source recovery, all of which improve.
Un-parking
interferometer/jax_grad/gradient.pyIt was
NEEDS_FIXfor an eager/jit divergence attributed topure_callbackconstant-folding on Python 3.13. Both attributions were wrong (#279):pure_callback— it is structurally absent from a rectangular-mesh path; it exists only in the Delaunay/Sibson qhull triangulation.The cause was the mapper defect #490 fixes. With it the script is green on both legs, all four variants, all FD/AD checks, all gradients live — eager/jit gap exactly 0.0, with
assert_eager_jit_consistentleft untouched atrtol=1e-10(3.13 83s, 3.12 86s against the 300s cap).The surrounding narrative comment in
no_run.yamlis updated too, since "The one below remains" is no longer true.Validation
All nine touched or un-parked scripts exit 0 against the fixed library, on a stack built from source at the versions of retime run 32741386752 (
jax/jaxlib0.11.1,jaxnnls1.0.1,numpy2.5.2,scipy1.17.1).autogalaxy_workspace_testneeds no changes — it asserts jax-vs-numpy parity, and both backends shift together.🤖 Generated with Claude Code
https://claude.ai/code/session_016azuS2UbS3mFvfxkDFGsKj
Generated by Claude Code