-
Notifications
You must be signed in to change notification settings - Fork 555
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
WIP: cuml-cpu: enable conda import tests, update scikit-learn and hdbscan to match cuml #6400
base: branch-25.04
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
- scikit-learn=1.5.* | ||
- hdbscan>=0.8.39,<0.8.40 |
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.
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.
And might help with #6340
# version | ||
RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}" | ||
if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then | ||
if [[ ${RAPIDS_CUDA_MAJOR} == "12" ]]; then |
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.
One less thing to change in a possible future where this project drops CUDA 11 support. This isn't strictly necessary for this PR but seemed small enough that it'd be ok to include here... let me know if you'd like it removed.
@@ -32,15 +32,17 @@ requirements: | |||
run: | |||
- python x.x | |||
- numpy>=1.23,<3.0a0 | |||
- packaging |
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.
🎉 these import tests caught a bug!
from cuml.internals.device_support import GPU_ENABLED
File "device_support.pyx", line 18, in init cuml.internals.device_support
ModuleNotFoundError: No module named 'packaging'
WARNING: Tests failed for cuml-cpu-25.04.00a95-py310_250306_g2c8f9071e_95.conda - moving package to /opt/conda/conda-bld/broken
cuml
and cuml-cpu
have a hard runtime dependency on packaging
, from stuff like this:
from packaging.version import Version |
but don't declare that in conda packages.
The wheels do correctly declare it:
cuml/python/cuml/pyproject.toml
Line 110 in fbcaf12
"packaging", |
- pandas | ||
- scikit-learn=1.2 | ||
- hdbscan>=0.8.38,<0.8.39 | ||
- scikit-learn=1.5.* |
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 revealed a significant problem... the latest Python that conda-forge
's scikit-learn
1.2 supports is Python 3.11: https://anaconda.org/conda-forge/scikit-learn/files?version=1.2.2
So this scikit-learn=1.2
pin could cause issues for users trying to install cuml-cpu
on Python 3.12 or later.
Reproducible example:
docker run \
--rm \
-it rapidsai/ci-conda \
bash
conda create \
--yes \
--name cuml-test \
'cuml-cpu==25.4.*' \
'python=3.12'
LibMambaUnsatisfiableError: Encountered problems while solving:
- package cuml-cpu-25.04.00a80-py312_250227_g4e4f7d89e_80 requires scikit-learn 1.2.*, but none of the providers can be installed
Could not solve for environment specs
The following packages are incompatible
├─ cuml-cpu =25.4 * is installable with the potential options
│ ├─ cuml-cpu [25.04.00a80|25.04.00a81|...|25.04.00a93] would require
│ │ └─ python_abi =3.10 *_cp310, which can be installed;
│ ├─ cuml-cpu [25.04.00a80|25.04.00a81|...|25.04.00a93] would require
│ │ └─ python_abi =3.11 *_cp311, which can be installed;
│ └─ cuml-cpu [25.04.00a80|25.04.00a81|...|25.04.00a93] would require
│ └─ scikit-learn =1.2 * with the potential options
│ ├─ scikit-learn [1.2.0|1.2.1|1.2.2] would require
│ │ └─ python_abi =3.10 *_cp310, which can be installed;
│ ├─ scikit-learn [1.2.0|1.2.1|1.2.2] would require
│ │ └─ python_abi =3.11 *_cp311, which can be installed;
│ ├─ scikit-learn [1.2.0|1.2.1|1.2.2] would require
│ │ └─ python_abi =3.8 *_cp38, which can be installed;
│ └─ scikit-learn [1.2.0|1.2.1|1.2.2] would require
│ └─ python_abi =3.9 *_cp39, which can be installed;
└─ python =3.12 * is not installable because it requires
└─ python_abi =3.12 *_cp312, which conflicts with any installable versions previously reported.
/ok to test |
Fixes #6403
This project publishes a conda package,
cuml-cpu
, which does what it sounds like... allows the use of cuML on systems without a GPU.This proposes some updates to packaging for
cuml-cpu
:scikit-learn
andhdbscan
dependencies to matchcuml
packaging
Notes for Reviewers
Benefits of these Changes
This adds a bit of test coverage in CI, minimally verifying that
cuml-cpu
is installable an thatimport cuml
works in an environment without a GPU.Inspired by:
cuvs
: cuvs-bench-cpu: avoid 'mkl' dependency on aarch64 cuvs#750It also fixes some potential user-facing bugs.
packaging
: WIP: cuml-cpu: enable conda import tests, update scikit-learn and hdbscan to match cuml #6400 (comment)cuml-cpu
not installable on Python 3.12 or later because of outdatedscikit-learn
pin: WIP: cuml-cpu: enable conda import tests, update scikit-learn and hdbscan to match cuml #6400 (comment)How I tested this