Upgrade JAX, TensorFlow + Keras, TFP, and typing_extensions for Python 3.13 compatibility #38
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.
PR Summary (one-paragraph)
This pull request updates JAX imports, standardizes type annotations, and upgrades dependencies to ensure full compatibility with Python 3.13. It replaces legacy
DeviceArrayannotations withArrayfrom JAX, enables 64-bit computation viajax.config.update("jax_enable_x64", True), and upgrades JAX, TensorFlow (with TF-Keras), TensorFlow Probability, GPflow, and typing_extensions to versions compatible with Python 3.13. These changes allow BayesNewton tests to run correctly under Python 3.13, while dataset-dependent tests may still fail if the corresponding experimental data is missing.Detailed changes
JAX import update
Changed from:
to:
Ensures proper configuration for 64-bit computations.
Type annotations updated
Changed:
to:
Aligns type annotations with JAX’s current array types and avoids deprecation warnings.
Dependencies upgraded
jaxandjaxlib:0.4.14→0.4.34tensorflow: upgraded to2.20.0tf-keras: upgraded to2.20.1tensorflow-probability: upgraded to0.25.0gpflow: upgraded to2.9.2typing_extensions: upgraded to4.15.0Rationale: fixes Python 3.13 compatibility issues, including:
TypeError: type 'typing.TypeVar' is not an acceptable base typeImpact on tests
TypeVarerrors.test_vs_gpflow_shutters.py) may fail if experiment data is missing, unrelated to these changes.