Repository navigation
fix: gate optax to python>=3.11 in the jax extra - #1426
Merged
Merged
Conversation
PyAutoGalaxy#530 pointed autogalaxy[jax] at autofit[jax] so optax follows the
jax chain. That was right for 3.11+, but autofit[jax] declared optax with no
Python marker, while every entry in autonerves[jax] carries
python_version >= '3.11'. So on 3.9/3.10 the extra suddenly asked pip to find
an optax for an interpreter recent optax has no wheels for, and pip backtracked
through the optax/jax release history until:
error: resolution-too-deep
That took every 3.9 leg of python_matrix red (PyAutoNerves, PyAutoArray,
PyAutoGalaxy, PyAutoLens) — legs that were green before the merge. My
regression.
optax is only useful where jax is installed and jax is already gated to 3.11+,
so giving optax the same marker loses nothing and restores the pre-merge
resolution on 3.9/3.10.
Verified in the built wheel metadata:
Requires-Dist: optax>=0.2.5; python_version >= "3.11" and extra == "jax"
and by marker evaluation: 3.9/3.10 -> False, 3.11/3.12/3.13 -> True.
Co-Authored-By: Claude Opus 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.
Hotfix for a regression I introduced in PyAutoGalaxy#530.
What broke
#530 pointed
autogalaxy[jax]atautofit[jax]sooptaxfollows the jax chain — correct for 3.11+, and it closed a real user-facing gap (pip install autolens[jax]previously did not get optax, soaf.MultiStartAdam/af.MultiStartProdigyraisedImportError).But
autofit[jax]declared optax with no Python marker, while every entry inautonerves[jax]carriespython_version >= '3.11'. So on 3.9/3.10 the extra suddenly asked pip to find an optax for an interpreter recent optax has no wheels for, and pip backtracked through the optax/jax release history until:That took every 3.9 leg of
python_matrixred — PyAutoNerves, PyAutoArray, PyAutoGalaxy and PyAutoLens — legs that were green in the pre-merge run.Fix
Give optax the same marker the rest of the jax family already has:
optax is only useful where jax is installed, and jax is already gated to 3.11+, so gating optax to match loses nothing on 3.9/3.10 and keeps #530's intended fix fully intact on 3.11+.
API Changes
None. Packaging metadata only, and strictly narrowing: the
jaxextra resolves exactly as it did before #530 on 3.9/3.10, and exactly as #530 intended on 3.11+.Verification
Built wheel metadata from this branch:
Marker evaluation across the matrix:
Lesson
An unmarked dependency added to an extra whose every other member is version-gated does not just fail to install — it can make the whole resolution unsolvable on the excluded interpreters. Marker parity within an extra is load-bearing.