Skip to content

Update numpy version specifier - #480

Merged
rapids-bot[bot] merged 3 commits into
rapidsai:branch-23.02from
ajschmidt8:numpy-pin
Jan 18, 2023
Merged

rapids-bot[bot] merged 3 commits into
rapidsai:branch-23.02from
ajschmidt8:numpy-pin

Conversation

@ajschmidt8

Copy link
Copy Markdown
Member

This PR updates the numpy version specifier for cucim.

It was previously updated in this commit to enable publishing Python 3.10 packages.

However, since there was no maximum version in that specifier, conda was picking up the latest version of numpy (1.24.1) which is incompatible with cudf's version of numba (numba>=0.56.2).

For instance, if you try to run this: mamba create -n test 'numba>=0.56.2' 'numpy>=1.24.1', it will fail to solve.

Running with the new version specifier in this PR does solve: mamba create -n test 'numba>=0.56.2' 'numpy>=1.21.3,<1.24'.

Therefore, this maximum version limit seems necessary for cucim to be compatible with the rest of RAPIDS.

@ajschmidt8 ajschmidt8 added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jan 16, 2023
@ajschmidt8
ajschmidt8 requested review from bdice and jakirkham January 16, 2023 19:54
@ajschmidt8
ajschmidt8 requested a review from a team as a code owner January 16, 2023 19:54
@ajschmidt8

Copy link
Copy Markdown
Member Author

This PR should unblock rapidsai/dask-cuda#1080.

@bdice

bdice commented Jan 16, 2023

Copy link
Copy Markdown
Contributor

I'm not sure if this is the right fix here. Only packages using numba should have a upper bound on numpy, and it doesn't look like this package depends on numba. Also, this upper bound pinning only applies until numba 0.57.0 is released (which adds support for newer numpy versions).

Instead, shouldn't we be pinning only cudf (and not cucim)? https://github.com/rapidsai/cudf/blob/36b07f13480d8f7ba18274cb3a63f06855d848ff/conda/recipes/cudf/meta.yaml#L65

Comment thread conda/recipes/cucim/meta.yaml Outdated
- cupy >=10,<12.0.0a0
- libcucim ={{ version }}
- numpy >=1.21.3
- numpy >=1.21.3,<1.24

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussed with @ajschmidt8 offline. This was solving to 1.24.1 in the host, which meant that the runtime pin_compatible was something like >=1.24 -- which is incompatible with cudf.

The solution is that host requirements should build against the oldest supported NumPy. Then the pin_compatible won't conflict with cudf's requirements.

Suggested change
- numpy >=1.21.3,<1.24
- numpy =1.21.3

@codecov-commenter

codecov-commenter commented Jan 16, 2023 •

Copy link
Copy Markdown

Codecov Report

Base: 92.95% // Head: 92.95% // No change to project coverage πŸ‘

Coverage data is based on head (5dd1f48) compared to base (c899ea2).
Patch has no changes to coverable lines.

Additional details and impacted files
@@              Coverage Diff              @@
##           branch-23.02     #480   +/-   ##
=============================================
  Coverage         92.95%   92.95%           
=============================================
  Files               130      130           
  Lines              9775     9775           
=============================================
  Hits               9086     9086           
  Misses              689      689           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

β˜” View full report at Codecov.
πŸ“’ Do you have feedback about the report comment? Let us know in this issue.

Comment thread conda/recipes/cucim/meta.yaml Resolved
Co-authored-by: jakirkham <jakirkham@gmail.com>
@ajschmidt8

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 2acc027 into rapidsai:branch-23.02 Jan 18, 2023
@ajschmidt8
ajschmidt8 deleted the numpy-pin branch January 18, 2023 15:10
@jakirkham

Copy link
Copy Markdown
Member

Thanks all! πŸ™

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.

5 participants