fix: restore zero-contour compatibility with JAX 0.11 - #623
Merged
Merged
Conversation
Collaborator
Author
|
Workspace integration PR: PyAutoLabs/autogalaxy_workspace_test#123. Library-first merge gate applies. Local validation and live development-only Heart override are recorded in both PR bodies and issue #622. |
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
JAX 0.11.2 passes a plain callable through custom_root which jax-zero-contour 2.0.0 then carries in a while-loop state, raising
TypeError: functools.partial is not a valid JAX type. Use a lazily loaded, cached solver subclass to normalize that callable to a JAX pytree Partial at both LensCalc construction sites.Refs #622; unblocks PyAutoLabs/euclid_strong_lens_modeling_pipeline#90.
API Changes
None — internal changes only. Optional-dependency behavior, signatures, numerical algorithms and cached solver reuse are preserved. No global monkey patch or module-level JAX import.
Test Plan
Scope and limitations
The upstream solver still does not promise vmap support for arbitrary terminated contours. The existing Einstein-radius reverse-gradient shape error reproduces on unmodified PyAutoGalaxy with JAX 0.10.2; this patch does not claim to repair it. No test was skipped or downgraded and no dependency cap was lowered.
Readiness
Human-authorized development-only Heart RED override — 2026-09-18
The live user replied “I authorize” to: “Authorize the development-only Heart override for #622’s repair PRs, acknowledging these reasons, and their green-CI merges?”
Exact current RED:
release validation FAILED (stage integrate).Exact current YELLOW:
manifest drift: remote-session blocks (generated) — 2 mismatch(es) vs PyAutoMind/repos.yaml.Passed branch gates: 1236 library tests; both-version JAX integration and Euclid regression; 230 full Euclid tests under JAX 0.11.2; 41/41 workspace smoke scripts; independent Sol review CLEAN.
Scope: commit, push and pending-release PRs for euclid-jax-contour-compat / #622, then merge only with every required GitHub CI check green, library first. Heart remains RED for releases. No release, failed-check bypass, protection override or SLURM submission is authorized. Existing modelling-script hold remains.
Generated by the PyAutoLabs agent workflow.