-
Notifications
You must be signed in to change notification settings - Fork 538
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
Install test dependencies at the same time as cuml packages. #5781
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the approach even though it'd be nice in the future if RDFG could handle this automatically
ci/test_cpp.sh
Outdated
EOF | ||
|
||
# TODO: install conda-merge in the CI images | ||
pip install conda-merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small question: why use pip for installing conda-merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fastest to do it this way for the prototype. I am installing this into the conda environment in rapidsai/ci-imgs#112.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also want to add conda-merge
to the base image if we find it useful. Could imagine this pattern showing up in other projects' CI
I'm still thinking about ways to improve this. Just wanted to get a prototype up first. What do you think about something like this, with CLI arguments for rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
rapids-dependency-file-generator \
--output conda \
--file_key test_python \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \
--extra-channels "${CPP_CHANNEL};${PYTHON_CHANNEL}" \
--extra-packages "libcuml cuml" | tee env.yaml
rapids-mamba-retry env create --force -f env.yaml -n test |
ci/test_cpp.sh
Outdated
- libcuml-tests | ||
EOF | ||
|
||
# TODO: install conda-merge in the CI images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a PR to the CI images for this: rapidsai/ci-imgs#112 but that would be unnecessary if we adopt this alternative approach: #5781 (comment)
ci/test_cpp.sh
Outdated
EOF | ||
|
||
# TODO: install conda-merge in the CI images | ||
pip install conda-merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fastest to do it this way for the prototype. I am installing this into the conda environment in rapidsai/ci-imgs#112.
@dantegd If you prefer the |
ci/test_cpp.sh
Outdated
- libcuml | ||
- libcuml-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that conda-merge will place CPP_CHANNEL
at a sufficient priority so that we grab build artifacts, but do we lose anything also constraining the packages to that channel?
- libcuml | |
- libcuml-tests | |
- ${CPP_CHANNEL}::libcuml | |
- ${CPP_CHANNEL}::libcuml-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good question. I designed rapidsai/dependency-file-generator#67 in such a way that the CI artifact channels will always be prepended. It's still possible that another channel could be used, but there's not a good way to inject the channel names corresponding to those packages if we go with the route of rapidsai/dependency-file-generator#67.
@bdice I think the |
I put up a PR with a feature Some dask test failed, seems like a network issue that a rerun will fix. Then let's merge this to unblock other PRs. I'll work on a follow-up for cuml (and the rest of RAPIDS) after we get rapidsai/dependency-file-generator#67 merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we end up pulling stable packages instead of from the build channels?
https://github.com/rapidsai/cuml/actions/runs/7997932570/job/21846716467?pr=5781
We might need to tighten the pinnings on the added packages - is it reasonable to pin these to the current nightly version and update the release scripts to bump this version?
ci/test_cpp.sh
Outdated
|
||
# TODO: install conda-merge in the CI images | ||
pip install conda-merge | ||
conda-merge test.yaml cuml.yaml > env.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we cat
the output of this file to see the placement of the new channels in the resulting environment file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked this locally, looks like the order isn't super defined when we don't have a common channel between the merged environments:
channels:
- rapidsai
- /tmp/cpp_channel
- rapidsai-nightly
- /tmp/python_channel
- dask/label/dev
- conda-forge
- nvidia
Think that putting rapidsai
below the artifact channels in the new environment file should be sufficient to get the channel ordering we desire (at least for this PR, think the approach in rapidsai/dependency-file-generator#67 should improve things)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for checking that. I agree the approach with prepend-channels will solve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the CPP test failure, but looks like we're grabbing from the correct channel now 🎉
https://github.com/rapidsai/cuml/actions/runs/8005972527/job/21867897863?pr=5781
…hannels. Co-authored-by: Charles Blackmon-Luca <20627856+charlesbluca@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this work @bdice; is there anything else that needs to happen now that rapidsai/shared-workflows#178 is in for these changes to be reflected?
😢 I made an empty commit earlier to rerun CI but didn't push it. I came back to this PR hoping it would be ready to merge by now. At this point, the CI images with the "proper" solution of |
I updated the implementation of this PR to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I agree this is much cleaner. Thanks!
test_libcuml: | ||
common: | ||
- output_types: conda | ||
packages: | ||
- libcuml==24.4.* | ||
- libcuml-tests==24.4.* | ||
test_cuml: | ||
common: | ||
- output_types: conda | ||
packages: | ||
- libcuml==24.4.* | ||
- cuml==24.4.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want this for wheels too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not needed. This dependency list is used exclusively for conda CI, to generate the environment with the PR artifacts and test dependencies in one solve. Wheels go through a different installation path and I'm not sure if it's possible to consolidate that environment generation into one step or not. Even if it is possible, it's unlikely that listing cuml-cu12
in the requirements file would be sufficient, since we need to install a specific filename for the wheel that was fetched from CI artifacts.
/merge |
/merge |
This is a port of rapidsai/cuml#5781 and part of rapidsai/build-planning#22 Authors: - Mike Sarahan (https://github.com/msarahan) - Paul Taylor (https://github.com/trxcllnt) Approvers: - Paul Taylor (https://github.com/trxcllnt) - https://github.com/jakirkham - Ray Douglass (https://github.com/raydouglass) URL: #1387
Contributes to rapidsai/build-planning#106 Proposes specifying the RAPIDS version in `conda install` calls that install CI artifacts, to reduce the risk of CI jobs picking up artifacts from other releases. ## Notes for Reviewers This only changes the docs build, because other packages already solve in a single `conda install` with version constraints, thanks to #5781. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) - Dante Gama Dessavre (https://github.com/dantegd) URL: #6103
This PR creates a conda environment containing both test dependencies and cuml packages. This is a workaround for some issues seen with conda being unable to downgrade from Arrow 15 (in the initial environment with test dependencies) to Arrow 14 (currently pinned by cudf, which is a dependency of cuml).
This is a partial solution for rapidsai/build-planning#22. (More work is needed for other RAPIDS repos.)
Depends on rapidsai/dependency-file-generator#67.