-
Notifications
You must be signed in to change notification settings - Fork 24.9k
[NumPy] use NumPy 2.x in CI #158647
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
base: gh/XuehaiPan/370/base
Are you sure you want to change the base?
[NumPy] use NumPy 2.x in CI #158647
Conversation
ghstack-source-id: 83ed021 Pull-Request: pytorch#158647
ghstack-source-id: a205a56 Pull-Request: pytorch#158647
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.
@XuehaiPan are you trying to use numpy 2.x everywhere in CI? Most of the individual bumps seem fine, however it does seem important to keep some coverage of minimum supported versions of both numpy
and other dependencies.
It's too early to drop numpy
1.26.4 support, that will have to stay for quite a while longer since a lot of ML/AI-relevant libraries only fairly recently did releases with numpy >=2.0 support (so this would narrow the window of compatible versions for all those libraries) or even for a few straggelrs aren't compatible at all yet (e.g., sagemaker-python-sdk
).
@rgommers FYI, the last numpy 1.x version (1.26) will be EoL in 2 months: This PR is still a draft. This will not be merged very soon. Additionally, PyTorch 2.8 features are frozen, and they should support NumPy 1.x. |
End-of-life for a Python package doesn't really mean much (nor is that even a thing for most projects) - it stays working just fine, it's not like for a distro that security bug fixes stop and it becomes dangerous to use that version. You have to think about this in terms of compatibility windows. And dropping numpy 1.26 in particular will shorten that window by a lot for many other packages, as you can see from version bumps in this PR. The current approach seems to be to keep the window as wide as possible, and you're switching it to be pretty aggressive here. E.g., support is removed for:
Some tightening there seems healthy because some versions are too old, but this probably swings a bit too far in the other direction. @albanD is there a policy on this similar to the policy for CPython support? |
We could at least fix some bugs discovered from this PR. |
We don't have a strict policy on this no. That being said, I 100% agree @cyyever that we should improve our numpy 2.X support. |
Stack from ghstack (oldest at bottom):
cc @seemethere @malfet @pytorch/pytorch-dev-infra @mruberry @rgommers