Skip to content

CI Add a nightly job that uses scikit-learn's nightlies#7621

Merged
rapids-bot[bot] merged 9 commits intorapidsai:mainfrom
betatim:nightly-nightlies
Jan 15, 2026
Merged

CI Add a nightly job that uses scikit-learn's nightlies#7621
rapids-bot[bot] merged 9 commits intorapidsai:mainfrom
betatim:nightly-nightlies

Conversation

@betatim
Copy link
Copy Markdown
Member

@betatim betatim commented Dec 17, 2025

This adds a job that runs some of our unit tests with the nightly version of scikit-learn. This gives us a heads up on changes that are coming, as well as a chance to give feedback on regressions.

The goal is to have a job that runs on cuml's main and uses the nightly version of scikit-learn.

Failures in this jobs should not count towards the "N nights nightlies haven't passed" as it can happen that upstream projects produce broken nightlies or other incompatibilities that are beyond our control to resolve.

How can we test this? Locally using the default docker image for the custom job the script executes. But it would be good to be able to test this before merging it to main.

Closes #7564

cc @jameslamb for your interest. This is similar but different from what you suggested in the issue. In particular regarding using dependencies.yaml (or not).

This adds a job that runs some of our unit tests with the nightly
version of scikit-learn. This gives us a heads up on changes that are
coming, as well as a chance to give feedback on regressions.
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Dec 17, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

mkdir -p "${RAPIDS_TESTS_DIR}"

# Explicitly install those packages that we want to have from the nightly index.
rapids-pip-retry install \
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could include the --extra-index-url options in dependencies.yaml but we want to control what is installed from the scientific-python-nightly index. If we add the --extra-index-url to the install command that installs all other dependencies would mean that we get all dependencies that exist on the nightly index from there. As of today we don't want to install all the dependencies that are available from that index.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is quite right. pip ignores pre-releases by default.

Using --isolated ignores any external configuration (to avoid "it works differently on my machine" issues). First, installing just scikit-learn (no constraint):

$ 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.0

If you use a pre-release specifier in the requirement, then pip will consider pre-releases only for that package. For example, the following pulls in a nightly of scikit-learn but ignores nightlies for everything else:

$ 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.0

side note: that "pre-release specifiers tell pip nightlies are OK" behavior led to some recent work to remove those specifiers where they'd been put in places where we did NOT want nightlies:

The only way you'd get pre-releases of everything that has them on any of the considered indices is if you pass --pre or set the equivalent environment variable.

$ 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.0

I really think you'll want something like:

  • put pre-release specifiers like >=1.8.0dev0 on all the dependencies where you're willing to accept nightlies
  • consolidate to a single pip install so all requirements are considered together (separate calls increase the risk of a broken environment)

Given those constraints, totally up to you if you want the --extra-index-url in dependencies.yaml or not. I think it could be helpful for it to always get selected alongside constraints spelled like sciki-learn>=1.8.0dev0, but can also see how keeping it inline in this script prevents mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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 --pre does).

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 1.n.0dev0 to 1.n+1.0dev0 every time a new version is released. In particular because the old command will keep running without an error but not do the right thing. Once the release of 1.8.0 has happened scikit-learn>=1.8.0dev0 will no longer install the latest nightly and there won't be an error either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure, makes sense!

Once the release of 1.8.0 has happened scikit-learn>=1.8.0dev0 will no longer install the latest nightly and there won't be an error either.

As soon as there was a 1.8.1dev0 or something (the first nightly after the 1.8.0 release), pip should pick that up because it prefers the latest version.

And if there isn't a newer version on the nightly index then picking up 1.8.0 isn't a problem, because that is the latest version (just happens to also have been a released one).

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 pip is to download from the nightly index and then install locally-downloaded wheels.

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/*.whl

Passing /tmp/nightly-wheels/*.whl to pip install as a requirement tells pip "you MUST install these specific files", which will prevent it from preferring other packages for those libraries.

Copy link
Copy Markdown
Member Author

@betatim betatim Jan 13, 2026

Choose a reason for hiding this comment

The 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 pip when we run into problems with it or see potential for optimisation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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 pip install calls and happy generally that this is testing what you want to test, it's fine to merge.

Looks like you already have a ci-codeowners approval, so this would just need @dantegd to resolve his blocking review.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

@betatim
Copy link
Copy Markdown
Member Author

betatim commented Dec 17, 2025

/ok to test 187fd31

Comment thread .github/workflows/test.yaml Outdated
@betatim betatim added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 6, 2026
@betatim betatim marked this pull request as ready for review January 6, 2026 09:03
@betatim betatim requested a review from a team as a code owner January 6, 2026 09:03
@betatim betatim requested a review from msarahan January 6, 2026 09:03
Comment thread ci/test_wheel_nightly_dependencies_versions.sh
@csadorf csadorf requested a review from dantegd January 8, 2026 17:40
Comment thread .github/workflows/test.yaml Outdated
@csadorf csadorf dismissed dantegd’s stale review January 13, 2026 16:31

The change request was addressed.

@betatim
Copy link
Copy Markdown
Member Author

betatim commented Jan 15, 2026

/merge

@rapids-bot rapids-bot Bot merged commit 60b2149 into rapidsai:main Jan 15, 2026
221 of 223 checks passed
@betatim betatim deleted the nightly-nightlies branch January 15, 2026 09:19
rapids-bot Bot pushed a commit that referenced this pull request Jan 21, 2026
## Summary

Removes the specialized `ci/test_wheel_nightly_versions.sh` script in favor of re-using the standard `ci/test_wheel.sh` script in combination with "nightly" dependencies.

This is a follow-up to #7621 .

Authors:
  - Simon Adorf (https://github.com/csadorf)

Approvers:
  - James Lamb (https://github.com/jameslamb)

URL: #7684
viclafargue pushed a commit to viclafargue/cuml that referenced this pull request Jan 26, 2026
Removes the specialized `ci/test_wheel_nightly_versions.sh` script in favor of re-using the standard `ci/test_wheel.sh` script in combination with "nightly" dependencies.

This is a follow-up to rapidsai#7621 .

Authors:
  - Simon Adorf (https://github.com/csadorf)

Approvers:
  - James Lamb (https://github.com/jameslamb)

URL: rapidsai#7684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI Test against the nightlies of our dependencies

6 participants