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 API compatibility issue #6869

Closed
bernardbeckerman opened this issue Jun 17, 2024 · 12 comments
Closed

Numpy 2.0 API compatibility issue #6869

bernardbeckerman opened this issue Jun 17, 2024 · 12 comments

Comments

@bernardbeckerman
Copy link

bernardbeckerman commented Jun 17, 2024

Heads-up that TB nightly builds are failing (pointer) due to the numpy 2.0 release (post). They've published a migration guide (link) which should hopefully make things simple to fix. Please let me know if this is something you're already looking into, or if it would be helpful for me to contribute a fix. Thanks!

bernardbeckerman pushed a commit to bernardbeckerman/Ax that referenced this issue Jun 17, 2024
Summary:
Numpy 2.0 was released yesterday ([post](https://numpy.org/news/#numpy-20-release-date-june-16)) and accordingly a couple of tests started breaking due to usage of a now-outdated API. This updates references to the now-deprecated `np.Inf` to `np.inf`, which is available in both old and new versions of numpy and so shouldn't create any issues.

Our early-stopping tutorial is still breaking due to a similar issue in TensorBoard (tensorflow/tensorboard#6869), so not all tests are expected to pass as of now.

Differential Revision: D58672474
facebook-github-bot pushed a commit to facebook/Ax that referenced this issue Jun 17, 2024
Summary:
Pull Request resolved: #2527

Numpy 2.0 was released yesterday ([post](https://numpy.org/news/#numpy-20-release-date-june-16)) and accordingly a couple of tests started breaking due to usage of a now-outdated API. This updates references to the now-deprecated `np.Inf` to `np.inf`, which is available in both old and new versions of numpy and so shouldn't create any issues.

Our early-stopping tutorial is still breaking due to a similar issue in TensorBoard (tensorflow/tensorboard#6869), so not all tests are expected to pass as of now.

Reviewed By: mpolson64

Differential Revision: D58672474

fbshipit-source-id: 717b751ac9608867976923bc60ecb5656cc36e08
@yatbear
Copy link
Member

yatbear commented Jun 18, 2024

Hi @bernardbeckerman,

Thanks so much for bringing up this issue and providing the pointer! Are you still interested in contributing to our repo? Please feel free to send us a PR :) Otherwise I can look into it.

@jloveric
Copy link

Yep, seeing this issue.

@joecummings
Copy link

@yatbear Can we get an update on this issue? Would love to remove the hacky fixes put in place to ensure our tests (using tensorboard) can pass.

@JamesHollyer
Copy link
Contributor

Thanks for the links. PR #6871 should be the fix. If all is well tomorrow will have a new working nightly build release. If it does not build I will reopen this issue.

@bernardbeckerman
Copy link
Author

bernardbeckerman commented Aug 7, 2024

Hi there, thanks so much for the fix! Is there a plan to cut a new release so that this change makes it into latest?

bernardbeckerman pushed a commit to bernardbeckerman/Ax that referenced this issue Aug 7, 2024
Summary: The latest TB version hasn't incorporated numpy2.0-compatible changes (tensorflow/tensorboard#6869 (comment)), and recently unpinned botorch (D60735276) means Ax CI is now failing. This pins numpy to < 2.0 to prevent issues in CI.

Differential Revision: D60917879
bernardbeckerman pushed a commit to bernardbeckerman/Ax that referenced this issue Aug 7, 2024
Summary:
Pull Request resolved: facebook#2641

The latest TB version hasn't incorporated numpy2.0-compatible changes (tensorflow/tensorboard#6869 (comment)), and recently unpinned botorch (D60735276) means Ax CI is now failing. This pins numpy to < 2.0 to prevent issues in CI.

Differential Revision: D60917879
bernardbeckerman pushed a commit to bernardbeckerman/Ax that referenced this issue Aug 7, 2024
Summary:
Pull Request resolved: facebook#2641

The latest TB version hasn't incorporated numpy2.0-compatible changes (tensorflow/tensorboard#6869 (comment)), and recently unpinned botorch (D60735276) means Ax CI is now failing. This pins numpy to < 2.0 to prevent issues in CI.

Differential Revision: D60917879
bernardbeckerman pushed a commit to bernardbeckerman/Ax that referenced this issue Aug 7, 2024
Summary:
Pull Request resolved: facebook#2641

The latest TB version hasn't incorporated numpy2.0-compatible changes (tensorflow/tensorboard#6869 (comment)), and recently unpinned botorch (D60735276) means Ax CI is now failing. This pins numpy to < 2.0 to prevent issues in CI.

Differential Revision: D60917879
facebook-github-bot pushed a commit to facebook/Ax that referenced this issue Aug 7, 2024
Summary:
Pull Request resolved: #2641

The latest TB version hasn't incorporated numpy2.0-compatible changes (tensorflow/tensorboard#6869 (comment)), and recently unpinned botorch (D60735276) means Ax CI is now failing. This pins numpy to < 2.0 to prevent issues in CI.

Differential Revision: D60917879

fbshipit-source-id: 8fda1ee98bde1000b970d45b75c75a735e205a08
@bernardbeckerman
Copy link
Author

cc @JamesHollyer just wanted to follow up on my previous message - is there a plan to cut a new release with these changes? Thanks for your help!

@joecummings
Copy link

cc @JamesHollyer just wanted to follow up on my previous message - is there a plan to cut a new release with these changes? Thanks for your help!

Bumping this! Would be really helpful for us too. Currently we pinned our version which isn't the best fix.

@JamesHollyer
Copy link
Contributor

Typically we do our releases when Tensorflow does theirs. However, I will bring it up in our team meeting today and discuss doing a one off release.

@mashu
Copy link

mashu commented Aug 13, 2024

It seems tensorboard is still broken (2.17.0)
AttributeError:np.string_was removed in the NumPy 2.0 release. Usenp.bytes_instead.. Did you mean: 'strings'?
Any walkaround?

@JamesHollyer
Copy link
Contributor

We are working on a patch release(2.17.1).

@JamesHollyer
Copy link
Contributor

Patch release complete.

@bernardbeckerman
Copy link
Author

@JamesHollyer thanks so much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants