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

Bifurcate Dependency Lists [skip-gpuci] #1073

Merged
merged 25 commits into from
Sep 6, 2022
Merged

Bifurcate Dependency Lists [skip-gpuci] #1073

merged 25 commits into from
Sep 6, 2022

Conversation

ajschmidt8
Copy link
Member

@ajschmidt8 ajschmidt8 commented Jul 26, 2022

Summary

This PR uses rapids-dependency-file-generator along with a new dependencies.yaml file to bifurcate the existing dependency lists in the conda/environments directory. rapids-dependency-file-generator will generate conda environment files based on the contents of the new dependencies.yaml file (see rapidsai/dependency-file-generator for more details). There is also a new GitHub Action that runs a shared workflow (which lives here) to ensure that the generated dependency files are up-to-date in each PR. This shared workflow can easily be implemented across other RAPIDS repositories.

Why is this PR Needed?

This PR is necessary to support some upcoming changes in CI. We've recently created some new, slimmer CI images (~450MB vs. the current 6.5GB) in anticipation of the move to GitHub Actions. These new images omit the large dependency packages (i.e. rapids-{build,notebook,doc}-env) from the rapidsai/integration repository, which will eventually be deprecated and deleted entirely. One of the consequences of removing the integration packages from our CI images is that commonly used test dependencies (i.e. pytest) are no longer included in the CI images by default. Therefore, we need to ensure that each repository has a list of the dependencies that are required to test its respective libraries. A similar list will also be needed in other repositories for JupyterLab Notebook dependencies (which will be utilized in our runtime end-user images), but that list does not apply to rmm.

Impacts of these Changes

The changes in this PR impact developers and CI as follows:

Developers

Developers should now update the dependencies in the dependencies.yaml file instead of the generated dependency files. If they accidentally update the generated dependency files, the new GitHub Action will fail. At this point, the developer will need to install rapids-dependency-file-generator and run it from the project's root directory. For example:

pip install rapids-dependency-file-generator
rapids-dependency-file-generator

This step can also be implemented as a pre-commit hook.

CI

The new GitHub Action CI process will use the dependencies in the test list in dependencies.yaml to create a new test environment for rmm/librmm in CI. For example:

ENV_NAME="rmm_test"

rapids-dependency-file-generator \
  --file_key "test" \
  --generate "conda" \
  --matrix "cuda=11.5;arch=$(arch)" > env.yaml
mamba env create --file env.yaml
mamba activate "$ENV_NAME"

# ... run `rmm`/`librmm` tests

Additional Information

The new GitHub Action will enforce that an all environment (under the files.all key) is included in the dependencies.yaml file and that it includes all of the dependency lists in the dependencies.conda and dependencies.conda_and_requirements sections. This is enforced in the shared workflow here. It exists to provide some standardization across the RAPIDS libraries and will eventually replace the rapids-{build,notebook,doc}-env packages in our devel end-user images.

@github-actions github-actions bot added the conda label Jul 26, 2022
@ajschmidt8 ajschmidt8 changed the title Bifurcate Dependency Lists Bifurcate Dependency Lists [skip-gpuci] Jul 26, 2022
@ajschmidt8 ajschmidt8 added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Jul 26, 2022
@ajschmidt8 ajschmidt8 force-pushed the split-deps branch 3 times, most recently from 27a6b41 to 370d8e6 Compare July 26, 2022 16:39
@bdice bdice self-requested a review July 29, 2022 21:37
conda/environments/envs.yaml Outdated Show resolved Hide resolved
@trxcllnt trxcllnt self-requested a review July 29, 2022 22:06
@harrism
Copy link
Member

harrism commented Aug 1, 2022

Is this really a 22.08 PR?

@ajschmidt8
Copy link
Member Author

ajschmidt8 commented Aug 2, 2022

Is this really a 22.08 PR?

Nope, I will re-target this PR for 22.10

@ajschmidt8 ajschmidt8 changed the base branch from branch-22.08 to branch-22.10 August 2, 2022 11:43
@harrism harrism added this to PR-WIP in v22.10 Release via automation Aug 2, 2022
@ajschmidt8 ajschmidt8 force-pushed the split-deps branch 4 times, most recently from 015013c to 79a082f Compare August 16, 2022 14:42
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@ajschmidt8 ajschmidt8 marked this pull request as ready for review September 2, 2022 17:08
@ajschmidt8 ajschmidt8 requested a review from a team as a code owner September 2, 2022 17:08
dependencies.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

All looks good to me. Thanks @ajschmidt8 for your hard work and many iterations!

v22.10 Release automation moved this from PR-WIP to PR-Reviewer approved Sep 6, 2022
@ajschmidt8 ajschmidt8 merged commit 9c6f5b6 into branch-22.10 Sep 6, 2022
v22.10 Release automation moved this from PR-Reviewer approved to Done Sep 6, 2022
@ajschmidt8 ajschmidt8 deleted the split-deps branch September 6, 2022 19:45
ajschmidt8 pushed a commit to rapidsai/cudf that referenced this pull request Nov 8, 2022
This PR uses the [`rapids-dependency-file-generator`](https://github.com/rapidsai/dependency-file-generator/) to handle sourcing dependencies. Similar to rapidsai/rmm#1073, this PR introduces a GitHub Action that enforces consistency between the new `dependencies.yaml` file and the generated conda environment for developers.

Authors:
   - Bradley Dice (https://github.com/bdice)

Approvers:
   - AJ Schmidt (https://github.com/ajschmidt8)
   - GALI PREM SAGAR (https://github.com/galipremsagar)
ajschmidt8 added a commit to rapidsai/raft that referenced this pull request Dec 7, 2022
This PR uses the [`rapids-dependency-file-generator`](https://github.com/rapidsai/dependency-file-generator/) to handle sourcing dependencies.

Similarly to rapidsai/rmm#1073 and rapidsai/cudf#11674, this PR introduces a GitHub Action that enforces consistency between the new `dependencies.yaml` file and the generated conda environment for developers.

Authors:
   - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
   - Bradley Dice (https://github.com/bdice)
   - Corey J. Nolet (https://github.com/cjnolet)
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
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants