Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumPy 2.0 support #19691

Open
jakirkham opened this issue May 8, 2024 · 5 comments
Open

NumPy 2.0 support #19691

jakirkham opened this issue May 8, 2024 · 5 comments
Assignees
Labels
type:feature The user is asking for a new feature.

Comments

@jakirkham
Copy link

Problem description

NumPy 2.0 is coming out soon ( numpy/numpy#24300 ). NumPy 2.0.0rc1 packages for conda & wheels came out 3 weeks back ( numpy/numpy#24300 (comment) )

Feature description

To prepare for NumPy 2.0, it might be worthwhile to start testing Keras against NumPy 2 in CI

Also as NumPy is tracking ecosystem support for NumPy 2.0, it would be helpful to share Keras's current support status in issue (with any plans): numpy/numpy#26191

NumPy has put out a migration guide. More details are in the release notes. As Keras doesn't have C/C++ usage of NumPy, only the Python changes would be relevant

@sachinprasadhs sachinprasadhs added type:feature The user is asking for a new feature. keras-team-review-pending Pending review by a Keras team member. labels May 8, 2024
@divyashreepathihalli
Copy link
Collaborator

@jakirkham I am curious about what the plans are for upgrading Numpy for JAX and TF?

@divyashreepathihalli divyashreepathihalli removed the keras-team-review-pending Pending review by a Keras team member. label May 9, 2024
@jakirkham
Copy link
Author

A relatively complete list of projects is in the table in the OP of issue: numpy/numpy#26191

With JAX, it sounds like they already have NumPy 2 support as of JAX 0.4.26: jax-ml/jax#19246

It sounds like TensorFlow is planning a release by end of May ( numpy/numpy#26191 (comment) ). Though we are waiting on more info from them as to whether NumPy 2 would make that release, but haven't heard back. So have gone ahead and raised a TensorFlow issue: tensorflow/tensorflow#67291

@fchollet
Copy link
Collaborator

I have taken a quick look and things are looking good so far, but in order to run the full suite of unit tests we need to have a compatible TF build available. We'll have to wait on the np 2 compatible TF RC in order to do that.

@mbbyn
Copy link

mbbyn commented Jun 30, 2024

We are experiencing a crash from Keras when updating numpy to 2.x related to np.Inf being removed in favor of np.inf.

@adamjstewart
Copy link

Is this solved in the 3.5.0 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants