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

Drop {{ pin_compatible('numpy', max_pin='x') }} #16301

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Jul 17, 2024

Description

Part of issue: rapidsai/build-planning#82

Drop {{ pin_compatible('numpy', max_pin='x') }} as it is no longer needed. numpy has its own run_exports, which constraints numpy to an API compatible version. More details in issue: https://github.com/orgs/rapidsai/projects/132

So cudf now uses that in its recipe builds. Also update requirements/run to set the numpy lower bound to 1.23 as required by us.

Lastly add todo comments for NumPy 2 update lines.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@jakirkham jakirkham added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 17, 2024
@jakirkham jakirkham requested a review from a team as a code owner July 17, 2024 23:13
@jakirkham jakirkham requested a review from bdice July 17, 2024 23:13
@jakirkham jakirkham force-pushed the drop_np_pin_compat branch 4 times, most recently from 58cf117 to 774f66b Compare July 17, 2024 23:31
This is no longer needed as `numpy`'s own `run_exports` sets this for
us. In `requirements/run` set the `numpy` lower bound to `1.23` so that
we have a higher bound than the `run_exports` would otherwise use.
@jakirkham jakirkham added Python Affects Python cuDF API. conda labels Jul 17, 2024
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.

Comment on lines +67 to 68
# TODO: Change to `2.0` for NumPy 2
- numpy 1.23
Copy link
Member Author

Choose a reason for hiding this comment

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

Once we update to NumPy 2, that will be true

Right now we build with NumPy 1.23, which means run_exports adds {{ pin_subpackage("numpy") }}. The defaults of pin_subpackage are to tightly pin on the lower bound and pin the upper bound based on major version. So this turns into numpy >=1.23.5,<2.0a0

Copy link
Member

Choose a reason for hiding this comment

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

oh got it, right. Ok sounds good to me.

Comment on lines +86 to +87
# TODO: Update `numpy` in `host` when dropping `<2.0a0`
- numpy >=1.23,<2.0a0
Copy link
Member Author

Choose a reason for hiding this comment

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

While this seems duplicative to what numpy's run_exports does, this same pinning is used throughout RAPIDS. Also it gives a foothold for RDFG changes to be made to move to NumPy 2. When that does happen, we have a comment above to remind us to make other needed changes in this recipe

@jakirkham
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit c6c21d7 into rapidsai:branch-24.08 Jul 18, 2024
79 checks passed
@jakirkham jakirkham deleted the drop_np_pin_compat branch July 18, 2024 19:41
@jakirkham
Copy link
Member Author

Thanks James! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conda improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants