You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restore optional zero-contour calculations with JAX 0.11.2 without changing global third-party behavior or importing JAX at library import time. This blocks Euclid pipeline PR #90 and the approved source-checkout deployment.
Plan
Add a narrow lazy compatibility adapter used by both LensCalc solver construction sites.
Cover values, compilation, batching behavior and derivatives in workspace integration scripts on JAX 0.10.2 and 0.11.2.
Validate the NumPy library suite and Euclid regression, obtain independent review, then ship library first through readiness and green-CI gates.
Detailed implementation plan
Affected Repositories
PyAutoGalaxy (primary; source)
autogalaxy_workspace_test (integration coverage)
Branch Survey
Both repositories are clean on main; no conflicting claims or existing repair worktrees. PyAutoGalaxy HEAD 33714b8; workspace_test HEAD e8b2f38. Existing workspace branch feature/jax-runtime-and-parity is not checked out or claimed.
Add an internal lazy solver factory in autogalaxy/operate/ which subclasses optional jax_zero_contour.ZeroSolver and normalizes the callable in step_parallel_tol with jax.tree_util.Partial. Preserve tolerance/iteration arguments, inherited numerical algorithms and the LensCalc solver cache. No global monkey patch or module-level JAX imports.
Use it at both solver construction sites in autogalaxy/operate/lens_calc.py, preserving optional-dependency warnings and return contracts.
Add integration coverage under scripts/misc/latent/ without growing the curated smoke list. Check circle contour and Einstein-radius values, jit, gradients and batching against both versions. Respect the existing unsupported-vmap boundary; do not claim expanded support without evidence.
Run the full PyAutoGalaxy NumPy suite, affected workspace smoke checks, and test_latent_euclid_variables_traces_under_jax_jit against both JAX versions with unchanged jax-zero-contour 2.0.0. Retain current tests, no skips/xfails or CI downgrade. Independent review must be CLEAN.
The user explicitly approved this source plan and green-CI repair/pipeline merges in the live 2026-09-18 session. This supersedes the original prompt's proposed-plan status. No library Heart override is inferred from pipeline issue #89. Current Heart RED: release validation FAILED (stage integrate); YELLOW: manifest drift: remote-session blocks (generated) — 2 mismatch(es) vs PyAutoMind/repos.yaml. Follow the applicable task-specific shipping gate after tests/review. No release authorization.
No SLURM submissions, including smoke jobs: “dont submit jobs until Ive okayed modeling script”. Preserve all science data/outputs. No fields.field.shear compatibility or tests; tracer.fields remains a list.
Original Prompt
Starting prompt (historical approval status superseded above)
Restore JAX 0.11 zero-contour compatibility for Euclid deployment
Type: bug
Target: @PyAutoGalaxy @autogalaxy_workspace_test
Autonomy: human-required
Priority: high
Filed: 2026-09-18
Blocks: PyAutoLabs/euclid_strong_lens_modeling_pipeline#90
Status: proposed; source plan approval required
The user approved the pipeline plan and subsequently approved its task-specific Heart RED development override and merge only with all required CI green. This new upstream source repair is proposed, not yet approved. The science modelling-script submission hold remains.
Reproduction and fix locus
Pipeline #90 at 7fbdbe5 has 230 local tests and 9/9 smoke passes, independent review CLEAN. Both CI unit matrix legs fail the existing latent JAX trace test with JAX/jaxlib 0.11.2 and jax-zero-contour 2.0.0; local JAX/jaxlib is 0.10.2.
A standalone circle-contour calculation with no PyAuto code passes on JAX 0.10.2, fails on 0.11.2 with functools.partial not a valid JAX type. ZeroSolver.newton uses jax.lax.custom_root; its step_parallel_tol puts the returned callable into a lax.while_loop state. A diagnostic-only adapter wrapping that callable with jax.tree_util.Partial passes the contour calculation and a gradient under 0.11.2. No installed package or production source was patched.
Add a narrowly scoped optional-dependency adapter in PyAutoGalaxy, used by both ZeroSolver construction sites in autogalaxy/operate/lens_calc.py. Normalize the callable to a JAX-compatible Partial in a subclass, without globally monkey-patching the third-party class or importing JAX at module import time.
Extend JAX integration coverage in autogalaxy_workspace_test/scripts/misc/latent/ (not library NumPy unit tests): contour/Einstein-radius values, jit, vmap and gradients under both JAX 0.10.2 and 0.11.2. Retain all existing pipeline tests; no skips, expected failures, or CI downgrade.
Run PyAutoGalaxy's NumPy suite, affected integration/smoke checks, Euclid failing latent trace test on both JAX versions, and independent review. Ship the separate library repair through standard gates, then rerun pipeline Include configs should apply to every image type #90 CI and resume the originally approved source-checkout deployment. Existing Heart RED reasons still require the proper task-specific shipping authorization for the new library task.
Branch survey
PyAutoGalaxy and autogalaxy_workspace_test are clean on main; conflict guard reports no claims for either. Proposed branch: feature/euclid-jax-contour-compat. Proposed worktree: ~/Code/PyAutoLabs-wt/euclid-jax-contour-compat. No issue, source branch, or source edit has been created for this proposed repair.
Overview
Restore optional zero-contour calculations with JAX 0.11.2 without changing global third-party behavior or importing JAX at library import time. This blocks Euclid pipeline PR #90 and the approved source-checkout deployment.
Plan
Detailed implementation plan
Affected Repositories
Branch Survey
Both repositories are clean on main; no conflicting claims or existing repair worktrees. PyAutoGalaxy HEAD 33714b8; workspace_test HEAD e8b2f38. Existing workspace branch feature/jax-runtime-and-parity is not checked out or claimed.
Suggested branch:
feature/euclid-jax-contour-compatWork classification: Both, library first.
Worktree root:
/home/jammy/Code/PyAutoLabs-wt/euclid-jax-contour-compatImplementation Steps
autogalaxy/operate/which subclasses optionaljax_zero_contour.ZeroSolverand normalizes the callable instep_parallel_tolwithjax.tree_util.Partial. Preserve tolerance/iteration arguments, inherited numerical algorithms and the LensCalc solver cache. No global monkey patch or module-level JAX imports.autogalaxy/operate/lens_calc.py, preserving optional-dependency warnings and return contracts.scripts/misc/latent/without growing the curated smoke list. Check circle contour and Einstein-radius values, jit, gradients and batching against both versions. Respect the existing unsupported-vmap boundary; do not claim expanded support without evidence.test_latent_euclid_variables_traces_under_jax_jitagainst both JAX versions with unchanged jax-zero-contour 2.0.0. Retain current tests, no skips/xfails or CI downgrade. Independent review must be CLEAN.Authorization and gates
The user explicitly approved this source plan and green-CI repair/pipeline merges in the live 2026-09-18 session. This supersedes the original prompt's proposed-plan status. No library Heart override is inferred from pipeline issue #89. Current Heart RED:
release validation FAILED (stage integrate); YELLOW:manifest drift: remote-session blocks (generated) — 2 mismatch(es) vs PyAutoMind/repos.yaml. Follow the applicable task-specific shipping gate after tests/review. No release authorization.No SLURM submissions, including smoke jobs: “dont submit jobs until Ive okayed modeling script”. Preserve all science data/outputs. No fields.field.shear compatibility or tests; tracer.fields remains a list.
Original Prompt
Starting prompt (historical approval status superseded above)
Restore JAX 0.11 zero-contour compatibility for Euclid deployment
Type: bug
Target: @PyAutoGalaxy @autogalaxy_workspace_test
Autonomy: human-required
Priority: high
Filed: 2026-09-18
Blocks: PyAutoLabs/euclid_strong_lens_modeling_pipeline#90
Status: proposed; source plan approval required
Original user request
Euclid + euclid_dr1 deployment (PyAutoMind/tmp/handoffs/euclid-flat-fields.md)
The user approved the pipeline plan and subsequently approved its task-specific Heart RED development override and merge only with all required CI green. This new upstream source repair is proposed, not yet approved. The science modelling-script submission hold remains.
Reproduction and fix locus
Pipeline #90 at 7fbdbe5 has 230 local tests and 9/9 smoke passes, independent review CLEAN. Both CI unit matrix legs fail the existing latent JAX trace test with JAX/jaxlib 0.11.2 and jax-zero-contour 2.0.0; local JAX/jaxlib is 0.10.2.
A standalone circle-contour calculation with no PyAuto code passes on JAX 0.10.2, fails on 0.11.2 with functools.partial not a valid JAX type. ZeroSolver.newton uses jax.lax.custom_root; its step_parallel_tol puts the returned callable into a lax.while_loop state. A diagnostic-only adapter wrapping that callable with jax.tree_util.Partial passes the contour calculation and a gradient under 0.11.2. No installed package or production source was patched.
Evidence: PyAutoMind/tmp/euclid-flat-fields/{ci-failed.log,zero-contour-repro.py,repro-jax010.log,repro-jax011.log,zero-contour-candidate.py,repro-candidate.log}. Third-party source: CKrawczyk/Jax-Zero-Contour.
Proposed plan
Branch survey
PyAutoGalaxy and autogalaxy_workspace_test are clean on main; conflict guard reports no claims for either. Proposed branch: feature/euclid-jax-contour-compat. Proposed worktree: ~/Code/PyAutoLabs-wt/euclid-jax-contour-compat. No issue, source branch, or source edit has been created for this proposed repair.