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

introduce rapids-generate-pip-constraints #114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jameslamb
Copy link
Member

Conributes to rapidsai/build-planning#81

rapidsai/shared-workflows#228 introduced a new environment variable for wheel-testing CI jobs, RAPIDS_DEPENDENCIES, which takes the following values:

  • oldest = pin to oldest-supported versions
  • latest = do not constraint versions

To take advantage of that in CI, PRs like rapidsai/cudf#16570 have been rolling out. They're all taking a similar approach, copying around the same snippet of code that generates a pip constraints.txt file using rapids-dependency-file-generator.

Based on the suggestion from rapidsai/cudf#16570 (comment), this proposes wrapping that behavior in a tool.

Notes for Reviewers

Benefits of this change

Simplifies and standardizes CI scripts.

Reduces the effort to roll out other types of testing with alternative dependency sets in the future.

How I tested this

With latest cudf (including the changes from rapidsai/cudf#16570) checked out, ran the following from the root of that repo:

PATH="${HOME}/repos/gha-tools/tools:${PATH}" \
RAPIDS_CUDA_VERSION="12.5.1" \
RAPIDS_DEPENDENCIES=latest \
RAPIDS_PY_VERSION="3.11" \
  ${GHA_TOOLS}/rapids-generate-pip-constraints \
      test_python \
      ./beep-boop.txt
      
cat ./beep-boop.txt
# (empty)

PATH="${HOME}/repos/gha-tools/tools:${PATH}" \
RAPIDS_CUDA_VERSION="12.5.1" \
RAPIDS_DEPENDENCIES=oldest \
RAPIDS_PY_VERSION="3.11" \
  ${GHA_TOOLS}/rapids-generate-pip-constraints \
      test_python \
      ./beep-boop.txt

# # This file is generated by `rapids-dependency-file-generator`.
# # To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
# cramjam
# cupy-cuda11x==12.0.0
# cupy-cuda12x==12.0.0
# cupy==12.0.0
# dask-cuda==24.10.*,>=0.0.0a0
# ...

PATH="${HOME}/repos/gha-tools/tools:${PATH}" \
RAPIDS_CUDA_VERSION="12.5.1" \
RAPIDS_DEPENDENCIES=oldset \
RAPIDS_PY_VERSION="3.11" \
  ${GHA_TOOLS}/rapids-generate-pip-constraints \
      test_python \
      ./beep-boop.txt
# [rapids-generate-pip-constraints] Got unrecognized value for RAPIDS_DEPENDENCIES: 'oldset'. Expected one of ('latest', 'oldest').

echo $?
# 1

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 5, 2024
Copy link

@seberg seberg left a comment

Choose a reason for hiding this comment

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

LGTM, nice. Also nice touch to add an error to the if!

@vyasr
Copy link
Contributor

vyasr commented Sep 20, 2024

@jameslamb could you put up a PR updating some repo (e.g. cudf) to use this tool? Cloning this branch in the CI of that repo and updating PATH should allow you to test the new tool.

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.

3 participants