Skip to content

CI Add third-party testing of cuml - #21897

Merged
rapids-bot[bot] merged 26 commits into
NVIDIA:mainfrom
betatim:add-cuml-integration-tests
Jun 16, 2026
Merged

CI Add third-party testing of cuml#21897
rapids-bot[bot] merged 26 commits into
NVIDIA:mainfrom
betatim:add-cuml-integration-tests

Conversation

@betatim

@betatim betatim commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Description

NVIDIA/cuml#7924

This runs a subset of the cuml test suite as part of the PR checks. The goal is to give PR authors a signal as to whether or not they are breaking cuml with their changes.

The tests were chosen by looking for test files that import cudf and tests of implementations that use cudf. Locally this selection of tests runs in about 3minutes. This seems like a good trade-off between getting coverage and not taking up too much time.

I copied the job setup from third-party-integration-tests-cudf-pandas, seemed like the most similar one.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

This runs a subset of the cuml test suite as part of the PR checks. The
goal is to give PR authors a signal as to whether or not they are
breaking cuml with their changes.
@betatim
betatim requested a review from a team as a code owner March 24, 2026 12:30
@betatim
betatim requested a review from msarahan March 24, 2026 12:30

@bdice bdice left a comment

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.

Seems fine to me. Please add a similar job in .github/workflows/test.yaml so we get nightly coverage too.

Comment thread ci/test_cuml_compat.sh Outdated
@betatim

betatim commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

Done and done

@mroeschke mroeschke added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Mar 24, 2026
@betatim

betatim commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

From looking at a subset of the failed tests I think they are all unrelated to the changes here. Looks like they are about misaligned memory in C++ tests :-/

@mroeschke

Copy link
Copy Markdown
Contributor

From looking at a subset of the failed tests I think they are all unrelated to the changes here. Looks like they are about misaligned memory in C++ tests :-/

Yeah I think RMM had an ABI break that's unrelated. However, I think the test discovery in the cuml job still needs a little more tweaking e.g. https://github.com/rapidsai/cudf/actions/runs/23548878530/job/68577344344?pr=21897#step:13:1416

RAPIDS logger » [03/25/26 17:26:28]
┌──────────────────────────────────────┐
|    pytest cuml cuDF-compat subset    |
└──────────────────────────────────────┘

ERROR: module or package not found: cuml.tests.test_array (missing __init__.py?)
============================= test session starts ==============================

platform linux -- Python 3.14.3, pytest-9.0.2, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /__w/cudf/cudf
configfile: pyproject.toml
plugins: cov-7.1.0, benchmark-5.2.3, cases-3.10.1, hypothesis-6.151.9, xdist-3.8.0
collected 0 items

============================ no tests ran in 1.31s =============================

@betatim

betatim commented Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

The problem is that cuml does not ship the tests in the coda package or the wheel. I see two possible ways forward: we convince cuml to ship the tests or we check them out from the cuml repo in the CI job.

Shipping the tests with cuml feels like the right thing to do, checking out from the repo feels like the quick fix (but also a tedious nightmare of making sure the right tests are checked out, etc). So I'll open an issue on cuml to propose shipping the tests.

@mroeschke

Copy link
Copy Markdown
Contributor

Shipping the tests with cuml feels like the right thing to do, checking out from the repo feels like the quick fix (but also a tedious nightmare of making sure the right tests are checked out, etc)

FWIW we checkout the pandas, Polars, and Narwhals repos (a specific tag) to run their tests in cuDF CI, so it's not the biggest deal to do the same with cuML

Comment thread ci/test_cuml_compat.sh Outdated
CUML_TESTS_DIR=/tmp/cuml/python/cuml/tests

rapids-logger "pytest cuml cuDF-compat subset"
timeout 15m python -m pytest --cache-clear \

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.

Is it worth adding other pytest flags here like -W error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As you wish. I have no opinion really on how strict you want these tests to be :D

Comment thread ci/test_cuml_compat.sh Outdated
@betatim
betatim requested a review from a team as a code owner April 8, 2026 11:46
Test files were renamed in cuml
@betatim

betatim commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

One of the test files was deleted, latest commit updates this. Let's wait and see if this happens again (test re-org in cuml), if yes I think we should find a mechanism where the list of tests executed is part of the cuml repo so that when someone makes a change in cuml they can also update it. Avoiding spurious failures here.

@mroeschke mroeschke left a comment

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.

Overall LGTM. Let us know when you think this is in a merge-able state with cuml test refactorings

@betatim

betatim commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the conflicts.

For me this is ready to go. What I meant to say is that if this breaks again because of test renaming we should consider a different approach, but until then "let's merge it!"

@vyasr vyasr left a comment

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.

Can we please make sure this job is set up properly as non-blocking before we merge?

@betatim

betatim commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

The latest commit should make the job actually optional. I also temporarily added a exit 1 to the test script so we can see this in action.

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds cuML compatibility testing to CI: a dependency bundle and file group, a CI script that runs selected cuML tests, and new workflow jobs in PR and test pipelines that run the script conditionally and non-blockingly.

Changes

cuML Compatibility Testing

Layer / File(s) Summary
Dependencies
dependencies.yaml
New depends_on_cuml bundle specifies cuml==26.6.*,>=0.0.0a0; new test_cuml file group includes the bundle with no standalone output.
Test Script
ci/test_cuml_compat.sh
New script sources test Python environment, clones matching cuML branch, and runs pytest against fixed cuML test modules with 15-minute timeout and cache clearing.
Workflow Integration
.github/workflows/pr.yaml, .github/workflows/test.yaml
New cuml-compat-tests job in PR workflow triggers conditionally on test_python_conda file changes (excluding cudf_polars and dask_cudf), runs in rapidsai/ci-conda:26.06-latest with continue-on-error: true, and is added to checks job ignored jobs list; test workflow adds matching job via shared template, targets gpu-l4-latest-1 GPU node, forwards standard inputs, and sets continue-on-error: true.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • rapidsai/cudf#22490: Both PRs modify .github/workflows/pr.yaml's checks.with.ignored_pr_jobs to ignore additional workflow jobs.

Suggested reviewers

  • msarahan
  • mroeschke
  • gforsyth
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, clearly explaining the goal to test cuML as part of PR checks and detailing the test selection criteria and performance trade-offs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title directly describes the main change: adding CI infrastructure for third-party testing of cuML compatibility.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr.yaml:
- Around line 596-598: The workflow passes undefined inputs (inputs.branch,
inputs.date, inputs.sha) into the cuml-compat-tests/custom-job invocation;
either remove those three parameters or replace them with GitHub context
variables (e.g., github.ref or github.sha and a generated date) so the push
workflow no longer references an undefined `inputs` object. Update the job call
that sets branch/date/sha to use github.ref/github.sha (or omit them if
custom-job.yaml already derives them) and ensure the invocation matches the
parameter names expected by custom-job.yaml (verify parameter names in
custom-job.yaml like branch/sha/date).

In `@ci/test_cuml_compat.sh`:
- Around line 15-17: The script currently clones cuml at RAPIDS_BRANCH and runs
tests from that head while the installed cuml package may be a different ref;
update ci/test_cuml_compat.sh so after cloning /tmp/cuml it determines the exact
ref of the installed cuML package (e.g., via a python import that reads
cuml.__git_revision__ or another package-provided git/tag identifier) and then
git checkout that specific commit/tag in /tmp/cuml instead of leaving it at the
branch tip referenced by RAPIDS_BRANCH; use the existing RAPIDS_BRANCH and
/tmp/cuml references to locate the clone and perform the checkout so tests run
against the exact package source.
- Around line 24-26: Remove the unconditional "exit 1" statement so the script
proceeds to run the test command; specifically delete the lone exit 1 that
precedes the "timeout 15m python -m pytest" invocation so the cuML compatibility
subset actually executes instead of aborting early.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d16cb9b7-bc75-4a1d-b12c-10d800f1091f

📥 Commits

Reviewing files that changed from the base of the PR and between c9ad1c5 and 7497c0a.

📒 Files selected for processing (4)
  • .github/workflows/pr.yaml
  • .github/workflows/test.yaml
  • ci/test_cuml_compat.sh
  • dependencies.yaml

Comment thread .github/workflows/pr.yaml
Comment thread ci/test_cuml_compat.sh
Comment thread ci/test_cuml_compat.sh Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.github/workflows/pr.yaml (1)

597-599: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Undefined inputs.* context in cuml-compat-tests job.

Line 597–599 use ${{ inputs.branch }}, ${{ inputs.date }}, and ${{ inputs.sha }} in a workflow declared with on: push; inputs is not defined in this context and actionlint flags it. Use github.* values or omit these keys if custom-job.yaml derives them.

#!/bin/bash
set -euo pipefail

# Confirm trigger type and absence of reusable-workflow inputs in this file
rg -n '^\s*on:|workflow_call|workflow_dispatch' .github/workflows/pr.yaml -A6 -B1

# Show all unresolved inputs.* references
rg -n '\binputs\.(branch|date|sha)\b' .github/workflows/pr.yaml -C2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr.yaml around lines 597 - 599, In the cuml-compat-tests
job in the workflow, the YAML is using undefined inputs (inputs.branch,
inputs.date, inputs.sha); replace those references with appropriate github
context variables (for example github.ref or github.sha and
github.event.head_commit.timestamp or github.run_id/date as applicable) or
remove these keys if custom-job.yaml derives them; update the entries that
currently read `${{ inputs.branch }}`, `${{ inputs.date }}`, and `${{ inputs.sha
}}` to use the correct `github.*` context or omit them so actionlint no longer
flags undefined `inputs.*`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In @.github/workflows/pr.yaml:
- Around line 597-599: In the cuml-compat-tests job in the workflow, the YAML is
using undefined inputs (inputs.branch, inputs.date, inputs.sha); replace those
references with appropriate github context variables (for example github.ref or
github.sha and github.event.head_commit.timestamp or github.run_id/date as
applicable) or remove these keys if custom-job.yaml derives them; update the
entries that currently read `${{ inputs.branch }}`, `${{ inputs.date }}`, and
`${{ inputs.sha }}` to use the correct `github.*` context or omit them so
actionlint no longer flags undefined `inputs.*`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 072cae53-4155-4158-9f05-af34a256dc76

📥 Commits

Reviewing files that changed from the base of the PR and between 7497c0a and 96dd2c5.

📒 Files selected for processing (4)
  • .github/workflows/pr.yaml
  • .github/workflows/test.yaml
  • ci/test_cuml_compat.sh
  • dependencies.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/test.yaml
  • dependencies.yaml

@vyasr
vyasr force-pushed the add-cuml-integration-tests branch from 0f30be2 to dd51a90 Compare June 16, 2026 17:47
@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Jun 16, 2026
…n-tests

# Conflicts:
#	.github/workflows/pr.yaml
#	dependencies.yaml
@vyasr
vyasr force-pushed the add-cuml-integration-tests branch from dd51a90 to 0ba43b8 Compare June 16, 2026 17:48
@vyasr

vyasr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test 0ba43b8

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/pr.yaml (2)

778-791: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit permissions block to cuml-compat-tests job.

All other jobs using secrets: inherit (e.g., third-party-integration-tests-cudf-pandas at lines 759-765) explicitly declare a permissions block. The cuml-compat-tests job should follow the same pattern for consistency and least-privilege security posture.

🔐 Proposed fix to add permissions
  cuml-compat-tests:
    needs: [conda-python-build, conda-python-build-noarch, changed-files]
+   permissions:
+     actions: read
+     contents: read
+     id-token: write
+     packages: read
+     pull-requests: read
    secrets: inherit # zizmor: ignore[secrets-inherit]
    uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr.yaml around lines 778 - 791, The cuml-compat-tests job
uses secrets: inherit but lacks an explicit permissions block, which is
inconsistent with other jobs in the workflow that use the same pattern (such as
third-party-integration-tests-cudf-pandas). Add a permissions block to the
cuml-compat-tests job configuration to match the security pattern used by other
similar jobs that inherit secrets. This should be added at the same indentation
level as the other top-level job properties like needs, secrets, and uses.

790-790: ⚠️ Potential issue | 🟡 Minor

Update container image to match other conda-based jobs.

The cuml-compat-tests job uses rapidsai/ci-conda:26.06-latest at line 790, while all other conda-based jobs (lines 476, 493, 510, 775, 829) use 26.08-latest. The test script clones cuML at the matching RAPIDS branch (currently main), which aligns with 26.08 development. Update the container image to rapidsai/ci-conda:26.08-latest for consistency unless there is a specific reason to maintain the older version.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr.yaml at line 790, Update the container_image value in
the cuml-compat-tests job from rapidsai/ci-conda:26.06-latest to
rapidsai/ci-conda:26.08-latest to align with the version used by all other
conda-based jobs in the workflow, ensuring consistency with the RAPIDS branch
that the test script clones.
♻️ Duplicate comments (1)
.github/workflows/pr.yaml (1)

785-787: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Remove or replace undefined inputs.branch, inputs.date, inputs.sha.

This workflow uses a push trigger (lines 2-5), not workflow_call, so the inputs object is undefined. These parameters should either be removed or replaced with GitHub context variables (e.g., github.ref, github.sha).

🔧 Proposed fix
  cuml-compat-tests:
    needs: [conda-python-build, conda-python-build-noarch, changed-files]
    secrets: inherit # zizmor: ignore[secrets-inherit]
    uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
    if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda && fromJSON(needs.changed-files.outputs.changed_file_groups).neither_cudf_polars_nor_dask_cudf
    with:
      build_type: pull-request
-     branch: ${{ inputs.branch }}
-     date: ${{ inputs.date }}
-     sha: ${{ inputs.sha }}
+     branch: ${{ github.ref }}
+     date: ${{ github.event.head_commit.timestamp }}
+     sha: ${{ github.sha }}
      node_type: "gpu-l4-latest-1"
      continue-on-error: true
      container_image: "rapidsai/ci-conda:26.06-latest"
      script: "ci/test_cuml_compat.sh"

Note: The same issue exists in third-party-integration-tests-cudf-pandas (lines 770-772), pandas-tests (lines 806-808), and narwhals-tests (lines 825-827).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr.yaml around lines 785 - 787, The workflow file uses a
push trigger which does not provide an inputs context object, making
inputs.branch, inputs.date, and inputs.sha undefined. Replace these references
with appropriate GitHub context variables: use github.ref or github.ref_name for
branch information and github.sha for the commit SHA. If date is not available
from context, remove it or compute it as needed. Apply this fix at all affected
locations: the primary site in .github/workflows/pr.yaml (lines 785-787 for the
main job), third-party-integration-tests-cudf-pandas job (lines 770-772),
pandas-tests job (lines 806-808), and narwhals-tests job (lines 825-827).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/pr.yaml:
- Around line 778-791: The cuml-compat-tests job uses secrets: inherit but lacks
an explicit permissions block, which is inconsistent with other jobs in the
workflow that use the same pattern (such as
third-party-integration-tests-cudf-pandas). Add a permissions block to the
cuml-compat-tests job configuration to match the security pattern used by other
similar jobs that inherit secrets. This should be added at the same indentation
level as the other top-level job properties like needs, secrets, and uses.
- Line 790: Update the container_image value in the cuml-compat-tests job from
rapidsai/ci-conda:26.06-latest to rapidsai/ci-conda:26.08-latest to align with
the version used by all other conda-based jobs in the workflow, ensuring
consistency with the RAPIDS branch that the test script clones.

---

Duplicate comments:
In @.github/workflows/pr.yaml:
- Around line 785-787: The workflow file uses a push trigger which does not
provide an inputs context object, making inputs.branch, inputs.date, and
inputs.sha undefined. Replace these references with appropriate GitHub context
variables: use github.ref or github.ref_name for branch information and
github.sha for the commit SHA. If date is not available from context, remove it
or compute it as needed. Apply this fix at all affected locations: the primary
site in .github/workflows/pr.yaml (lines 785-787 for the main job),
third-party-integration-tests-cudf-pandas job (lines 770-772), pandas-tests job
(lines 806-808), and narwhals-tests job (lines 825-827).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0d554fdd-9dea-4daf-a122-3a7ab39e6250

📥 Commits

Reviewing files that changed from the base of the PR and between 96dd2c5 and 0ba43b8.

📒 Files selected for processing (2)
  • .github/workflows/pr.yaml
  • .github/workflows/test.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test.yaml

@vyasr vyasr closed this Jun 16, 2026
@vyasr vyasr reopened this Jun 16, 2026
@vyasr

vyasr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test

@vyasr vyasr changed the title CI Add third-party testing of cuml CI Add third-party testing of cuml Jun 16, 2026
@vyasr vyasr changed the title CI Add third-party testing of cuml CI Add third-party testing of cuml Jun 16, 2026
@vyasr

vyasr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit e3ab155 into NVIDIA:main Jun 16, 2026
263 of 267 checks passed
@betatim
betatim deleted the add-cuml-integration-tests branch June 17, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants