Skip to content

cuml-cpu: fix import issues, enable conda import tests #6400

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

Merged
merged 32 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b4b0619
cuml-cpu: enable conda import tests, update dependencies to match cuml
jameslamb Mar 5, 2025
2c8f907
test key is 'test:' not 'tests:'
jameslamb Mar 5, 2025
796c15e
declare dependency on 'packagin'
jameslamb Mar 6, 2025
dbd1a31
try putting cupy import in a TYPE_CHECKING block
jameslamb Mar 7, 2025
f6c3f96
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 7, 2025
6cdc2d5
defer type hint evaluation for cupy types
jameslamb Mar 10, 2025
bfadd37
Merge branch 'ci/import-tests' of github.com:jameslamb/cuml into ci/i…
jameslamb Mar 10, 2025
51a4078
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 10, 2025
9313e50
use deferred evaluation of type hints, make cupyx a GPU-only import
jameslamb Mar 10, 2025
b8ef5d7
Merge branch 'ci/import-tests' of github.com:jameslamb/cuml into ci/i…
jameslamb Mar 10, 2025
158f50f
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 10, 2025
a75cb8a
try deferred evaluation with strings instead
jameslamb Mar 10, 2025
c988e02
Merge branch 'ci/import-tests' of github.com:jameslamb/cuml into ci/i…
jameslamb Mar 10, 2025
ea05d34
one more hint
jameslamb Mar 10, 2025
ed28c40
get a more informative error
jameslamb Mar 10, 2025
6ef1703
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 10, 2025
35a47e0
try removing return type hints with cuDF types
jameslamb Mar 10, 2025
afc0677
Merge branch 'ci/import-tests' of github.com:jameslamb/cuml into ci/i…
jameslamb Mar 10, 2025
d62060a
remove more unconditional imports of cudf
jameslamb Mar 11, 2025
3b68d76
switch to context-manager form of cudf.core.buffer.acquire_spill_lock
jameslamb Mar 11, 2025
e3ef66c
make ufunc lazy
jameslamb Mar 11, 2025
0b5cf79
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 11, 2025
f53a777
np. references in function signatures
jameslamb Mar 11, 2025
70cfeab
Merge branch 'ci/import-tests' of github.com:jameslamb/cuml into ci/i…
jameslamb Mar 11, 2025
6318df0
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 11, 2025
387e850
merge branch-25.04
jameslamb Mar 12, 2025
8eaffbe
Merge branch 'ci/import-tests' of github.com:jameslamb/cuml into ci/i…
jameslamb Mar 12, 2025
153b218
fix merge conflicts
jameslamb Mar 12, 2025
7cc30cc
revert unnecessary whitespace change
jameslamb Mar 13, 2025
9e979be
Merge branch 'branch-25.04' of github.com:rapidsai/cuml into ci/impor…
jameslamb Mar 13, 2025
4082d54
Merge branch 'branch-25.04' into ci/import-tests
jameslamb Mar 18, 2025
6a56ca5
fall back to numpy in sparsefuncs
jameslamb Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 156 additions & 157 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,140 +13,139 @@ jobs:
# Please keep pr-builder as the top job here
pr-builder:
needs:
- check-nightly-ci
- changed-files
- checks
- clang-tidy
# - check-nightly-ci
# - changed-files
# - checks
# - clang-tidy
- conda-cpp-build
- conda-cpp-tests
- conda-cpp-checks
# - conda-cpp-tests
# - conda-cpp-checks
- conda-python-build
- conda-python-tests-singlegpu
- conda-python-tests-dask
- conda-notebook-tests
- docs-build
- telemetry-setup
- wheel-build-libcuml
- wheel-build-cuml
- wheel-tests-cuml
- devcontainer
# - telemetry-setup
# - wheel-build-libcuml
# - wheel-build-cuml
# - wheel-tests-cuml
# - devcontainer
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: always()
with:
needs: ${{ toJSON(needs) }}
telemetry-setup:
runs-on: ubuntu-latest
continue-on-error: true
env:
OTEL_SERVICE_NAME: "pr-cuml"
steps:
- name: Telemetry setup
if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main
check-nightly-ci:
# Switch to ubuntu-latest once it defaults to a version of Ubuntu that
# provides at least Python 3.11 (see
# https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat)
runs-on: ubuntu-24.04
env:
RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check if nightly CI is passing
uses: rapidsai/shared-actions/check_nightly_success/dispatch@main
with:
repo: cuml
# TODO: remove this once upstream issues in RAFT are resolved on 11.4.
# The limit was temporarily increased to unblock work.
max_days_without_success: 30
changed-files:
secrets: inherit
needs: telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
files_yaml: |
test_cpp:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!python/**'
- '!thirdparty/LICENSES/**'
test_notebooks:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!thirdparty/LICENSES/**'
test_python:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!thirdparty/LICENSES/**'
checks:
secrets: inherit
needs: telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
enable_check_generated_files: false
ignored_pr_jobs: >-
optional-job-conda-python-tests-cudf-pandas-integration telemetry-summarize
clang-tidy:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "cpu8"
arch: "amd64"
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/run_clang_tidy.sh"
# telemetry-setup:
# runs-on: ubuntu-latest
# continue-on-error: true
# env:
# OTEL_SERVICE_NAME: "pr-cuml"
# steps:
# - name: Telemetry setup
# if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
# uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main
# check-nightly-ci:
# # Switch to ubuntu-latest once it defaults to a version of Ubuntu that
# # provides at least Python 3.11 (see
# # https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat)
# runs-on: ubuntu-24.04
# env:
# RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - name: Check if nightly CI is passing
# uses: rapidsai/shared-actions/check_nightly_success/dispatch@main
# with:
# repo: cuml
# # TODO: remove this once upstream issues in RAFT are resolved on 11.4.
# # The limit was temporarily increased to unblock work.
# max_days_without_success: 30
# changed-files:
# secrets: inherit
# needs: telemetry-setup
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# files_yaml: |
# test_cpp:
# - '**'
# - '!.devcontainer/**'
# - '!.pre-commit-config.yaml'
# - '!CONTRIBUTING.md'
# - '!README.md'
# - '!docs/**'
# - '!img/**'
# - '!notebooks/**'
# - '!python/**'
# - '!thirdparty/LICENSES/**'
# test_notebooks:
# - '**'
# - '!.devcontainer/**'
# - '!.pre-commit-config.yaml'
# - '!CONTRIBUTING.md'
# - '!README.md'
# - '!thirdparty/LICENSES/**'
# test_python:
# - '**'
# - '!.devcontainer/**'
# - '!.pre-commit-config.yaml'
# - '!CONTRIBUTING.md'
# - '!README.md'
# - '!docs/**'
# - '!img/**'
# - '!notebooks/**'
# - '!thirdparty/LICENSES/**'
# checks:
# secrets: inherit
# needs: telemetry-setup
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# enable_check_generated_files: false
# ignored_pr_jobs: >-
# optional-job-conda-python-tests-cudf-pandas-integration telemetry-summarize
# clang-tidy:
# needs: checks
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# build_type: pull-request
# node_type: "cpu8"
# arch: "amd64"
# container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
# run_script: "ci/run_clang_tidy.sh"
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-cpp-checks:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
enable_check_symbols: true
# conda-cpp-tests:
# needs: [conda-cpp-build, changed-files]
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
# with:
# build_type: pull-request
# conda-cpp-checks:
# needs: conda-cpp-build
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# build_type: pull-request
# enable_check_symbols: true
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-python-tests-singlegpu:
needs: [conda-python-build, changed-files]
needs: [conda-python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: "ci/test_python_singlegpu.sh"
optional-job-conda-python-tests-cudf-pandas-integration:
needs: [conda-python-build, changed-files]
needs: [conda-python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
Expand All @@ -155,15 +154,15 @@ jobs:
build_type: pull-request
script: "ci/test_python_integration.sh"
conda-python-tests-dask:
needs: [conda-python-build, changed-files]
needs: [conda-python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: "ci/test_python_dask.sh"
conda-notebook-tests:
needs: [conda-python-build, changed-files]
needs: [conda-python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks
Expand All @@ -183,55 +182,55 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/build_docs.sh"
wheel-build-libcuml:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel_libcuml.sh
extra-repo: rapidsai/cumlprims_mg
extra-repo-sha: branch-25.04
extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY
# build for every combination of arch and CUDA version, but only for the latest Python
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
wheel-build-cuml:
needs: [checks, wheel-build-libcuml]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
script: ci/build_wheel_cuml.sh
wheel-tests-cuml:
needs: [wheel-build-cuml, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel.sh
devcontainer:
needs: telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
arch: '["amd64"]'
cuda: '["12.8"]'
extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY
build_command: |
sccache -z;
build-all --verbose;
sccache -s;
# wheel-build-libcuml:
# needs: checks
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# build_type: pull-request
# branch: ${{ inputs.branch }}
# sha: ${{ inputs.sha }}
# date: ${{ inputs.date }}
# script: ci/build_wheel_libcuml.sh
# extra-repo: rapidsai/cumlprims_mg
# extra-repo-sha: branch-25.04
# extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY
# # build for every combination of arch and CUDA version, but only for the latest Python
# matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
# wheel-build-cuml:
# needs: [checks, wheel-build-libcuml]
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# build_type: pull-request
# script: ci/build_wheel_cuml.sh
# wheel-tests-cuml:
# needs: [wheel-build-cuml, changed-files]
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
# with:
# build_type: pull-request
# script: ci/test_wheel.sh
# devcontainer:
# needs: telemetry-setup
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# arch: '["amd64"]'
# cuda: '["12.8"]'
# extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY
# build_command: |
# sccache -z;
# build-all --verbose;
# sccache -s;

telemetry-summarize:
# This job must use a self-hosted runner to record telemetry traces.
runs-on: linux-amd64-cpu4
needs: pr-builder
if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }}
continue-on-error: true
steps:
- name: Telemetry summarize
uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main
# telemetry-summarize:
# # This job must use a self-hosted runner to record telemetry traces.
# runs-on: linux-amd64-cpu4
# needs: pr-builder
# if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }}
# continue-on-error: true
# steps:
# - name: Telemetry summarize
# uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main
5 changes: 2 additions & 3 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry build \

sccache --show-adv-stats

# Build cuml-cpu only in CUDA 11 jobs since it only depends on python
# Build cuml-cpu only in CUDA 12 jobs since it only depends on python
# version
RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then
if [[ ${RAPIDS_CUDA_MAJOR} == "12" ]]; then
sccache --zero-stats

RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry build \
--no-test \
conda/recipes/cuml-cpu

sccache --show-adv-stats
Expand Down
Loading
Loading