Skip to content

feat: promote optax to default dependency; update no-jax messages (PyAutoLens#702) - #1503

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/jax-default-dependency
Aug 19, 2026
Merged

feat: promote optax to default dependency; update no-jax messages (PyAutoLens#702)#1503
Jammy2211 merged 2 commits into
mainfrom
feature/jax-default-dependency

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Part of promoting JAX to a default dependency of the stack (PyAutoLens#702). optax>=0.2.5 moves 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: the use_jax=True-without-jax warning box in Analysis, and the ImportError raised by the JAX-native gradient searches (MultiStartAdam/MultiStartProdigy) — both now say JAX is a default dependency and point at pip install jax. Install docs (pip/conda) updated: pip install autofit is the JAX-enabled command; Intel Mac NumPy-only fallback documented.

API Changes

None — no Python API changes. Packaging: optax moves 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)
  • Edited files compile; warning-box alignment preserved
  • No-JAX CI leg (PyAutoHeart lib-tests.yml unittest-nojax) green once the Heart PR merges
Full API Changes (for automation & release notes)

Changed Behaviour

  • pip install autofit now installs optax by default (except Intel macOS), and JAX via the autonerves chain.
  • The no-JAX warning in Analysis and the ImportError from MultiStartAdam/MultiStartProdigy no longer recommend the [jax] extra; they recommend pip install jax / pip install jax optax.

Migration

  • Before: pip install autofit[jax]
  • After: 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.

@Jammy2211

Copy link
Copy Markdown
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>
@Jammy2211
Jammy2211 merged commit 31da1a0 into main Aug 19, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/jax-default-dependency branch August 19, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant