-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-40376: [Python] Update for NumPy 2.0 ABI change in PyArray_Descr->elsize #40418
GH-40376: [Python] Update for NumPy 2.0 ABI change in PyArray_Descr->elsize #40418
Conversation
…escr->elsize Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
@seberg we are also using the arrow/python/pyarrow/src/arrow/python/arrow_to_pandas.cc Lines 538 to 543 in bdd04c0
|
Should use |
Yes, exactly, thanks! |
And the same for fields ;) |
@github-actions crossbow submit -g python |
Revision: 27f15ab Submitted crossbow builds: ursacomputing/crossbow @ actions-d5247ffd0e |
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.
Thanks, the changes look good to me from the NumPy side. Maybe we should add a way to get datetime metadata more directly some time (and if fields/names would be real functions we would have more freedom to modify it, but that isn't a downstream code change now at least :)).
@github-actions crossbow submit -g wheel |
This comment was marked as outdated.
This comment was marked as outdated.
It seems that wheel-manylinux failures and wheel-windows failures are related to this. |
Yes, those are related, but it's because it is not yet picking up the latest nightly numpy wheel to build against (the changes in this PR require numpy changes of a few days ago). |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit wheel-windows-cp312-amd64 |
Revision: 74caa26 Submitted crossbow builds: ursacomputing/crossbow @ actions-e37c72b24e
|
OK, my last commit adding some extra prints to our cmake set up at least confirms that in this case it is using an older numpy:
(from beginning of February, which matches with the time when those images were last updated #39622) Will then try again to force rebuilding them here in this PR (it's not clear to me how that can be done generally) |
@github-actions crossbow submit wheel-windows-cp312-amd64 |
Revision: 49df2c5 Submitted crossbow builds: ursacomputing/crossbow @ actions-d87170315f
|
@github-actions crossbow submit wheel-windows-cp312-amd64 |
Revision: 0d97bf8 Submitted crossbow builds: ursacomputing/crossbow @ actions-7909cb5614
|
OK, my last commit did succeed in ensuring we weren't accidentally using the cached images, and now it was building with against numpy 2.0.0b1 as shown by cmake, and now the windows build did succeed! (well, still red but now that's the known test failure on windows, which will be fixed with rebasing) So the actual code changes are all good here. Now I only need to figure out how to ensure we rebuild the cached images properly (instead of just not using the cache as I did in the last commit, which I don't want to merge to main) |
@github-actions crossbow submit wheel-windows-cp312-amd64 |
Revision: c3e18d1 Submitted crossbow builds: ursacomputing/crossbow @ actions-5ccdad511a
|
@github-actions crossbow submit test-conda-python-3.10-pandas-nightly test-conda-python-3.11-pandas-upstream_devel |
Revision: c3e18d1 Submitted crossbow builds: ursacomputing/crossbow @ actions-5525cfe7b2
|
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.
+1
Remaining failures are now actual (and known) test failures (the pandas nightly is being fixed by #40429) |
Thanks for working on this, I wish rebuilding from scratch was less tedious. |
The tediousness was mostly because of our own building infrastructure, not because of numpy ;) Thanks for the help! |
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit a421314. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
NumPy 2.0 is changing some ABI, see the issue description and numpy/numpy#25946 for more details.
The changes here should make our code compatible both with current numpy 1.x and future numpy 2.x