-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Unblock NumPy 2.0 #6991
Unblock NumPy 2.0 #6991
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@albertvillanova Any chance we could get this in before the next release? Everything depending on HuggingFace has their NumPy upgrade blocked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI integration tests for Python 3.10 are failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the CI tests for Python 3.8 are OK because they use numpy 1.24.4: numpy 2.0.0 requires Python >= 3.10
The incompatible libraries are:
|
Why is it installing numpy 2 if the dependencies don't support it? |
For me, I'm getting:
|
Which version on Python do you have? |
3.12.4 I'll try on 3.10 now. |
Please, note that I obtained the previous incompatible libraries in my local environment, by forcing the update of numpy. |
In the Python 3.10 CI, the situation is different:
See, CI installs:
|
Alternatively, we should ignore/select tests depending on the installed versions. |
That works. Alternatively, you could depend on tensorflow >= 2.16.2 (etc.) for the tests? |
Yes, I was thinking of a workaround solution. The issue I see is that our CI will not test numpy 2.0 indeed. |
Right, that's the advantage of the test skipping you wanted, I see your point. Thing is, it won't be long before tensorflow supports numpy 2.0, and then the situation is resolved and your tests test numpy 2.0. Do you really want to invest a lot of effort into testing numpy 2.0 for a few months benefit? |
Without testing Numpy 2.0, we do not know if there are some other parts in the code broken. |
Yes, you're right. I understand you're point, but you could say this for anything that your test dependencies don't support. I guess the solution is to write tests that don't depend on tensorflow, etc., but still use numpy. You could write some Jax tests for example. That said, blocking numpy 2 isn't a good solution in my opinion. These dependencies are extremely late in supporting Numpy 2. They were supposed to be testing against preview releases over three months ago. I don't think the world should have to wait for them. |
For example, while testing locally, I have discovered that librosa is also incompatible with numpy-2.0, due to its dependency on soxr: |
While testing locally, I have also discovered that pytorch does not support Numpy 2.0 on Windows platforms: |
I am adding Numpy 2.0 tests to your PR if you don't mind, before merging this PR. |
Awesome, thank you! Please let me know if I need to do anything. |
Now we test numpy 2.0 in the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
Show benchmarksPyArrow==8.0.0 Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
|
* Unblock NumPy 2.0 * . * Revert tensorflow min version * Add CI tests for numpy2 * Implement test require_numpy1_on_windows * Mark tests with require_numpy1_on_windows * Fix test skip reason * Add clarifying comment --------- Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
* Unblock NumPy 2.0 * . * Revert tensorflow min version * Add CI tests for numpy2 * Implement test require_numpy1_on_windows * Mark tests with require_numpy1_on_windows * Fix test skip reason * Add clarifying comment --------- Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
* Unblock NumPy 2.0 * . * Revert tensorflow min version * Add CI tests for numpy2 * Implement test require_numpy1_on_windows * Mark tests with require_numpy1_on_windows * Fix test skip reason * Add clarifying comment --------- Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
Fixes #6980