-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Release 2.4 windows wheels are not compatible with numpy 2.0 #131668
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
Comments
Looks like linux, macos are not affected
Validation workflows: https://github.com/pytorch/builder/actions/runs/10080038080 |
From the linked CI log it seems likely indeed the 2.4.0 The CI job confuses the matter slightly because:
However, that shouldn't affect the result as far as I can tell. A plain |
To mitigate the issue torchvision windows binaries where published with All the tests are successful now: https://github.com/pytorch/builder/actions/runs/10080038080/job/27877807547 |
@atalman I dont have torchvision. I was getting the error I quoted above with plain torch. |
same error here. |
Todo: Add a smoke test https://github.com/pytorch/builder/blob/main/test/smoke_test/smoke_test.py for both numpy 1.x and 2.x install. |
JFYI: For older PyTorch versions (e.g. 2.3.1) this is still an issue (or at least a warning...).
Such breakages inevitably happen when a package (e.g. |
This issue is fixed in nightly build by: Test passing:
|
Fixed in rc 2.4.1. Validations with numpy 2.0.0 : https://github.com/pytorch/builder/actions/runs/10528142201/job/29172994583#step:9:486 |
- can be removed once pytorch 2.4.1 releases - see: pytorch/pytorch#131668 (comment)
PyTorch added support for numpy 2 starting with PyTorch 2.3.0. This allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Signed-off-by: James Butler <james.butler@revvity.com>
PyTorch added support for numpy 2 starting with PyTorch 2.3.0. This allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Signed-off-by: James Butler <james.butler@revvity.com>
PyTorch added support for numpy 2 starting with PyTorch 2.3.0. This allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Signed-off-by: James Butler <james.butler@revvity.com>
PyTorch added support for numpy 2 starting with PyTorch 2.3.0. This allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Signed-off-by: James Butler <james.butler@revvity.com>
PyTorch added support for numpy 2 starting with PyTorch 2.3.0. This allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Signed-off-by: James Butler <james.butler@revvity.com>
…able numpy 2 compatibility (#8368) This is a follow-up to the comments made in #8296 (comment). ### Description This bumps the minimum required `torch` version from 1.13.1 to 2.2.0 in the first commit. See GHSA-5pcm-hx3q-hm94 and GHSA-pg7h-5qx3-wjr3 for more details regarding the "High" severity scoring. - https://nvd.nist.gov/vuln/detail/CVE-2024-31580 - https://nvd.nist.gov/vuln/detail/CVE-2024-31583 Additionally, PyTorch added support for numpy 2 starting with PyTorch 2.3.0. The second commit in this PR allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. 628C I have included this commit in this PR as upgrading to torch 2.2 means you might as well update to 2.3 to get the numpy 2 compatibility. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Maintainers will need to update the required status checks for the [`dev`](https://github.com/Project-MONAI/MONAI/tree/dev) branch to: - Remove min-dep-pytorch (2.0.1) ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [X] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. --------- Signed-off-by: James Butler <james.butler@revvity.com>
…able numpy 2 compatibility (Project-MONAI#8368) This is a follow-up to the comments made in Project-MONAI#8296 (comment). ### Description This bumps the minimum required `torch` version from 1.13.1 to 2.2.0 in the first commit. See GHSA-5pcm-hx3q-hm94 and GHSA-pg7h-5qx3-wjr3 for more details regarding the "High" severity scoring. - https://nvd.nist.gov/vuln/detail/CVE-2024-31580 - https://nvd.nist.gov/vuln/detail/CVE-2024-31583 Additionally, PyTorch added support for numpy 2 starting with PyTorch 2.3.0. The second commit in this PR allows for numpy 1 or numpy 2 to be used with torch>=2.3.0. I have included this commit in this PR as upgrading to torch 2.2 means you might as well update to 2.3 to get the numpy 2 compatibility. A special case is being handled on Windows as PyTorch Windows binaries had compatibilities issues with numpy 2 that were fixed in torch 2.4.1 (see pytorch/pytorch#131668 (comment)). Maintainers will need to update the required status checks for the [`dev`](https://github.com/Project-MONAI/MONAI/tree/dev) branch to: - Remove min-dep-pytorch (2.0.1) ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [X] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. --------- Signed-off-by: James Butler <james.butler@revvity.com> Signed-off-by: Can-Zhao <volcanofly@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
🐛 Describe the bug
When numpy not preinstalled on the machine, with latest torch install we get : https://github.com/pytorch/builder/actions/runs/10080038080/job/27868882276#step:9:438
Cause:
numpy release https://pypi.org/project/numpy/2.0.1/ is not compatible with torch
numpy dependency is coming from torchvision METADATA
Versions
2.4.0 - torchvision 0.19
cc @ezyang @gchanan @zou3519 @kadeng @msaroufim
The text was updated successfully, but these errors were encountered: