feat: promote optax to default dependency; update no-jax messages (PyAutoLens#702) - #1503
Merged
Conversation
Collaborator
Author
|
Workspace PR: PyAutoLabs/autofit_workspace#139 |
…caught by the new no-jax CI leg (PyAutoLens#702) np.int64/np.float64 are not int/float subclasses under NumPy 2, so BetaMessage/GammaMessage/NormalMessage built from NumPy scalars imported jax (ModuleNotFoundError when absent). np.generic added to the NumPy-side isinstance check in all three. Co-Authored-By: Claude Fable 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.
Summary
Part of promoting JAX to a default dependency of the stack (PyAutoLens#702).
optax>=0.2.5moves from the[jax]extra into the base dependencies (marker-gated for Intel macOS, where jax has no wheels — optax depends on jax, so an unmarked optax would break resolution there); jax itself arrives via autonerves' base dependencies. The[jax]extra is kept as a declared no-op alias (PyAutoLens#687). The autonerves floor comment now records the follow-up: bump the floor to the first release with JAX in autonerves' base deps once it exists.Two in-code messages that recommended the now-no-op
[jax]extra are updated: theuse_jax=True-without-jax warning box inAnalysis, and the ImportError raised by the JAX-native gradient searches (MultiStartAdam/MultiStartProdigy) — both now say JAX is a default dependency and point atpip install jax. Install docs (pip/conda) updated:pip install autofitis the JAX-enabled command; Intel Mac NumPy-only fallback documented.API Changes
None — no Python API changes. Packaging:
optaxmoves into the default dependencies;[jax]becomes a no-op alias. Two user-facing message texts updated.See full details below.
Test Plan
pytest test_autofit/non_linear/passes (517 passed, 15 skipped)unittest-nojax) green once the Heart PR mergesFull API Changes (for automation & release notes)
Changed Behaviour
pip install autofitnow installsoptaxby default (except Intel macOS), and JAX via the autonerves chain.Analysisand the ImportError fromMultiStartAdam/MultiStartProdigyno longer recommend the[jax]extra; they recommendpip install jax/pip install jax optax.Migration
pip install autofit[jax]pip install autofit(the[jax]form still works — no-op alias)Part of the six-repo JAX-default-dependency change: PyAutoLens#702.
Generated by the PyAutoLabs agent workflow.