-
Notifications
You must be signed in to change notification settings - Fork 623
CI Add a nightly job that uses scikit-learn's nightlies #7621
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
Changes from all commits
6712290
187fd31
0894fe3
ed93f54
6a9d619
5b745b3
9497623
05bbbfd
71eddd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Test cuml with the nightly versions of its dependencies. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| source rapids-init-pip | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" | ||
| CUML_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python) | ||
| LIBCUML_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp) | ||
| RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} | ||
| mkdir -p "${RAPIDS_TESTS_DIR}" | ||
|
|
||
| # Explicitly install the packages (and their dependencies) that we want to have from the nightly index. | ||
| rapids-pip-retry install \ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could include the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is quite right. Using $ NIGHTLY_INDEX="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
$ pip install --isolated --dry-run --no-cache-dir --extra-index-url=${NIGHTLY_INDEX} 'scikit-learn'
Looking in indexes: https://pypi.org/simple, https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
...
Would install joblib-1.5.3 numpy-2.3.5 scikit-learn-1.8.0 scipy-1.16.3 threadpoolctl-3.6.0If you use a pre-release specifier in the requirement, then $ pip install --isolated --dry-run --no-cache-dir --extra-index-url=${NIGHTLY_INDEX} 'scikit-learn>=1.8.0dev0'
Looking in indexes: https://pypi.org/simple, https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
...
Would install joblib-1.5.3 numpy-2.3.5 scikit-learn-1.9.dev0 scipy-1.16.3 threadpoolctl-3.6.0side note: that "pre-release specifiers tell
The only way you'd get pre-releases of everything that has them on any of the considered indices is if you pass $ pip install --pre --isolated --dry-run --no-cache-dir --extra-index-url=${NIGHTLY_INDEX} 'scikit-learn'
Looking in indexes: https://pypi.org/simple, https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
..
Would install joblib-1.5.3 numpy-2.5.0.dev0 scikit-learn-1.9.dev0 scipy-1.18.0.dev0 threadpoolctl-3.6.0I really think you'll want something like:
Given those constraints, totally up to you if you want the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should rephrase the comment, because having the dependencies of scikit-learn from the anaconda nightly channel is what I was expecting to happen (what What I want to avoid is that one day we suddenly get nightlies for other direct cuml dependencies. This could happen because the package decides to start uploading wheels to the nightlies from one day to the next. I also want to avoid having to update the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, makes sense!
As soon as there was a And if there isn't a newer version on the nightly index then picking up That said, if you want to always guarantee this job installs the latest version on the nightly index, then the most reliable way I know to do that with Like this: mkdir -p /tmp/nightly-wheels
pip download \
--no-deps \
--index-url=${NIGHTLY_INDEX} \
--prefer-binary \
-d /tmp/nightly-wheels \
'numpy>=2.5.0.dev0' \
'scikit-learn>=1.9.0dev0' \
'scipy>=1.18.0.dev0'
rapids-pip-retry install \
"${LIBCUML_WHEELHOUSE}"/libcuml*.whl \
"$(echo "${CUML_WHEELHOUSE}"/cuml*.whl)[test]" \
--requirement requirements.txt \
--constraint "${PIP_CONSTRAINT}" \
/tmp/nightly-wheels/*.whlPassing
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you be ok with merging it as it is? I'd like to see this running so we can fix hiccups in time for 26.02. This means we'd need to merge within the next days so that I can observe what happens and have time left to fix it before Friday. We can fine tune
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left 1 small comment about the CI config that should be resolved, but otherwise I won't block merging this. If you're comfortable with the risks introduced by separating this into multiple Looks like you already have a
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should merge this as-is and then explore whether to adopt some of the proposed improvements to make this more robust in a follow-up. |
||
| --pre \ | ||
| --extra-index-url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ | ||
| scikit-learn | ||
|
|
||
| rapids-dependency-file-generator \ | ||
| --output requirements \ | ||
| --file-key test_python \ | ||
| --matrix "dependencies=latest" | tee requirements.txt | ||
|
|
||
| # notes: | ||
| # | ||
| # * echo to expand wildcard before adding `[test,experimental]` requires for pip | ||
| # * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is | ||
| # ignored if any other --constraint are passed via the CLI | ||
| # | ||
| rapids-pip-retry install \ | ||
| "${LIBCUML_WHEELHOUSE}"/libcuml*.whl \ | ||
| "$(echo "${CUML_WHEELHOUSE}"/cuml*.whl)[test]" \ | ||
| --requirement requirements.txt \ | ||
| --constraint "${PIP_CONSTRAINT}" | ||
|
|
||
| EXITCODE=0 | ||
| trap "EXITCODE=1" ERR | ||
| set +e | ||
|
|
||
| rapids-logger "pytest cuml single GPU" | ||
| timeout 1h ./ci/run_cuml_singlegpu_pytests.sh \ | ||
| --numprocesses=8 \ | ||
| --dist=worksteal | ||
|
|
||
| rapids-logger "Test script exiting with value: $EXITCODE" | ||
| exit ${EXITCODE} | ||
Uh oh!
There was an error while loading. Please reload this page.