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

Remove NumPy <2 pin #762

Merged
merged 6 commits into from
Aug 23, 2024
Merged

Remove NumPy <2 pin #762

merged 6 commits into from
Aug 23, 2024

Conversation

seberg
Copy link
Contributor

@seberg seberg commented Aug 19, 2024

This PR removes the NumPy<2 pin which is expected to work for
RAPIDS projects once CuPy 13.3.0 is released (CuPy 13.2.0 had
some issues preventing the use with NumPy 2).

@seberg seberg added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Aug 19, 2024
@jakirkham jakirkham closed this Aug 22, 2024
@jakirkham jakirkham reopened this Aug 22, 2024
@jakirkham jakirkham marked this pull request as ready for review August 22, 2024 18:53
@jakirkham jakirkham requested a review from a team as a code owner August 22, 2024 18:53
@jakirkham jakirkham requested a review from bdice August 22, 2024 18:53
@jakirkham
Copy link
Member

Now that CuPy 13.3.0 is out. Marking this ready for review

Merged in branch-24.10 latest to pickup the fixes in PR: #764

@jakirkham
Copy link
Member

Looks like the wheels had two test failures in CI:

FAILED python/cucim/src/cucim/skimage/color/tests/test_colorconv.py::test_gray2rgba_alpha_fail_cast[-1-uint8] - OverflowError: Python integer -1 out of bounds for uint8
FAILED python/cucim/src/cucim/skimage/color/tests/test_colorconv.py::test_gray2rgba_alpha_fail_cast[300-int8] - OverflowError: Python integer 300 out of bounds for int8

Conda doesn't have the same issue, but am seeing NumPy downgraded to there. So we are likely missing something there too

@jakirkham
Copy link
Member

So Conda downgrades NumPy because

  1. Conda-forge rebuilt scikit-image 0.24.0 with NumPy 2: Rebuild for numpy 2.0 conda-forge/scikit-image-feedstock#110
  2. Currently we only support scikit-image 0.23.x: Upgrading to scikit-image 0.24.0 #768

Addressing either of these would fix the issue

@seberg seberg requested a review from a team as a code owner August 22, 2024 19:59
@seberg
Copy link
Contributor Author

seberg commented Aug 22, 2024

So this failure is new with NumPy 2.1, it seems pretty harmless, I pushed a potential fix, but would be good if @grlee77 can have a quick look if that seems good.

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging changes look ok to me. I poked around and don't see any other uses of numpy that were missed.

Just one question... have we double-checked that the assumptions here hold for both the NumPy 1.x and 2.x ABI?

inline const char* to_numpy_dtype(const DLDataType& dtype) {

Are there new-in-NumPy-2.x datatypes that need to be added there?

Copy link
Contributor

@grlee77 grlee77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @seberg. The compatibility change looks good to me

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all! 🙏

The changes look good here

We do need to update scikit-image, which is being done in PR: #769

So marking as requests changes and adding "DO NOT MERGE" until that PR is in

Once that PR is in will merge in the latest upstream branch here to rerun CI and confirm that we have fixed the Conda NumPy 1 downgrade issue mentioned above. Then validate the CI logs to make sure we are getting NumPy 2

Assuming all of that goes well. We can merge after

@jakirkham
Copy link
Member

PR ( #769 ) was just merged

Have resolved conflicts (as numpy & scikit-image dependencies were on adjacent lines in come cases)

CI is now running

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok can now see NumPy 2 in CI testing of conda packages and it remains through later updates

numpy                     2.1.0           py311hed25524_0    conda-forge

Approving now that this issue is cleared up

@jakirkham
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit 6796d6d into rapidsai:branch-24.10 Aug 23, 2024
37 checks passed
@jakirkham jakirkham added this to the v24.10.00 milestone Aug 23, 2024
@jakirkham
Copy link
Member

Thanks all! 🙏

@seberg seberg deleted the my_new_branch branch August 23, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants