Skip to content

Add cuFile wheel dependencies for Python tests - #23392

Merged
rapids-bot[bot] merged 5 commits into
NVIDIA:release/26.08from
bdice:fix/add-cufile-wheel-dependencies
Jul 22, 2026
Merged

Add cuFile wheel dependencies for Python tests#23392
rapids-bot[bot] merged 5 commits into
NVIDIA:release/26.08from
bdice:fix/add-cufile-wheel-dependencies

Conversation

@bdice

@bdice bdice commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

The ci-imgs change in rapidsai/ci-imgs#408 switched citestwheel images from CUDA devel to base, which no longer bundles libcufile.so with the container. Now we must install cuFile wheels in Python test environments that use CUDA wheels.

CUDA 12 uses nvidia-cufile-cu12 with some caveats in the pinnings, because cuFile wheels weren't available until 12.6.3 so the [cufile] extra isn't reliable.

CUDA 13 uses the cuda-toolkit[cufile] extra.

Checklist

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

@bdice
bdice requested a review from a team as a code owner July 22, 2026 00:54
@bdice
bdice requested a review from KyleFromNVIDIA July 22, 2026 00:54
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d4bb99b0-cc36-4489-9c63-9f7feb7b3a6a

📥 Commits

Reviewing files that changed from the base of the PR and between 61d2b7b and 7923333.

📒 Files selected for processing (1)
  • dependencies.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • dependencies.yaml

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Updated CUDA wheel dependency generation to include the required cuFile packages for CUDA 12.x environments.
    • Adjusted CUDA 13.x dependencies to enable cuFile where it is supported.
    • Refined version pinning for CUDA 12.x to match the available cuFile wheel releases, improving compatibility across 12.x variants.

Walkthrough

Changes

CUDA cuFile requirements

Layer / File(s) Summary
cuFile requirement selectors
dependencies.yaml
CUDA 12.x wheel matrices pin nvidia-cufile-cu12; cuDF CUDA 12 selectors use that package, while CUDA 13 selectors add the cufile toolkit extra.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Suggested labels: improvement, ci, cudf-polars

Suggested reviewers: kylefromnvidia, msarahan, vyasr

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding cuFile wheel dependencies for Python tests.
Description check ✅ Passed The description matches the changeset and explains the CUDA 12/13 cuFile dependency updates.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
dependencies.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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

@bdice bdice added bug Something isn't working non-breaking Non-breaking change labels Jul 22, 2026
@bdice
bdice force-pushed the fix/add-cufile-wheel-dependencies branch from 79bc5de to 7675c05 Compare July 22, 2026 01:01
@bdice
bdice requested review from a team as code owners July 22, 2026 01:01
@bdice
bdice requested review from misiugodfrey, rjzamora and vyasr July 22, 2026 01:01
@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. cudf.pandas Issues specific to cudf.pandas labels Jul 22, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jul 22, 2026
@bdice
bdice changed the base branch from main to release/26.08 July 22, 2026 01:02
@bdice
bdice removed request for a team, misiugodfrey, rjzamora and vyasr July 22, 2026 01:02

@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: 1

Caution

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

⚠️ Outside diff range comments (1)
python/cudf/cudf/core/groupby/groupby.py (1)

1338-1343: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not flatten the source MultiIndex restored by these branches.

DataFrameGroupBy.agg in python/cudf/cudf/core/groupby/groupby.py Lines 4297-4319 still rewrites every result with result._data.nlevels > 1 to its second level. These branches now intentionally return multiindex=True for single aggregations and empty outputs, so agg("sum") on MultiIndex columns is flattened again, while empty results can lose their empty MultiIndex metadata. The new test in python/cudf/cudf/tests/groupby/test_agg.py Lines 809-821 will expose this regression. Restrict the collapse to aggregation-generated multi-level outputs, such as by guarding it with _is_multi_agg(func).

Proposed fix
-        if result._data.nlevels > 1:
+        if _is_multi_agg(func) and result._data.nlevels > 1:

Also applies to: 1349-1368

🤖 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 `@python/cudf/cudf/core/groupby/groupby.py` around lines 1338 - 1343, In
DataFrameGroupBy.agg, restrict the result-level collapse for
result._data.nlevels > 1 to aggregation-generated multi-level outputs by
guarding it with _is_multi_agg(func). Preserve the multiindex metadata and
source MultiIndex returned by the restoration branches, including
single-aggregation and empty-result paths.
🧹 Nitpick comments (1)
python/cudf/cudf/tests/groupby/test_agg.py (1)

809-821: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for empty outputs and typed MultiIndex levels.

These tests cover non-empty string-labeled MultiIndexes and flat relabeling, but not the len(data) == 0 branch in groupby.py Lines 1329-1343 or preservation of non-object level_dtypes. Add a case with only the grouping column so aggregation returns zero data columns, plus a MultiIndex containing an integer level, and compare both values and column metadata with pandas.

As per coding guidelines, Python test files should cover edge cases such as empty and mixed-type inputs.

Also applies to: 824-835

🤖 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 `@python/cudf/cudf/tests/groupby/test_agg.py` around lines 809 - 821, Add tests
alongside test_agg_multiindex_columns_preserved for a groupby aggregation with
only the grouping column, producing zero data columns, and assert pandas and
cuDF values plus column metadata match. Add a separate MultiIndex-column case
containing an integer level, exercise the same aggregation, and verify
non-object level_dtypes and labels are preserved against pandas; ensure both
empty-output and mixed-type cases cover the relevant groupby paths.

Source: Coding guidelines

🤖 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 `@dependencies.yaml`:
- Around line 986-989: Update the wildcard CUDA dependency entry for
nvidia-cufile-cu12 so the cuda: "12.*" path uses a compatible pinned version, or
change the matrix configuration to select an exact CUDA minor version; ensure
the run_cudf integration path does not install the unpinned package when invoked
with cuda=12.

---

Outside diff comments:
In `@python/cudf/cudf/core/groupby/groupby.py`:
- Around line 1338-1343: In DataFrameGroupBy.agg, restrict the result-level
collapse for result._data.nlevels > 1 to aggregation-generated multi-level
outputs by guarding it with _is_multi_agg(func). Preserve the multiindex
metadata and source MultiIndex returned by the restoration branches, including
single-aggregation and empty-result paths.

---

Nitpick comments:
In `@python/cudf/cudf/tests/groupby/test_agg.py`:
- Around line 809-821: Add tests alongside test_agg_multiindex_columns_preserved
for a groupby aggregation with only the grouping column, producing zero data
columns, and assert pandas and cuDF values plus column metadata match. Add a
separate MultiIndex-column case containing an integer level, exercise the same
aggregation, and verify non-object level_dtypes and labels are preserved against
pandas; ensure both empty-output and mixed-type cases cover the relevant groupby
paths.
🪄 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: 4561047b-f968-442d-a866-6a89dd1d73d7

📥 Commits

Reviewing files that changed from the base of the PR and between 79bc5de and 7675c05.

📒 Files selected for processing (7)
  • cpp/src/strings/regex/glushkov_regcomp.cpp
  • cpp/src/strings/regex/glushkov_regcomp.hpp
  • cpp/tests/strings/split_tests.cpp
  • dependencies.yaml
  • python/cudf/cudf/core/groupby/groupby.py
  • python/cudf/cudf/pandas/scripts/pandas-testing-plugin.py
  • python/cudf/cudf/tests/groupby/test_agg.py
💤 Files with no reviewable changes (1)
  • python/cudf/cudf/pandas/scripts/pandas-testing-plugin.py

Comment thread dependencies.yaml 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)
dependencies.yaml (1)

986-987: 🗄️ Data Integrity & Integration | 🟠 Major

Pin the wildcard CUDA 12 cuFile dependency.

Line 987 still emits bare nvidia-cufile-cu12 for cuda: "12.*", while the pins at Lines 777-797 only apply to exact CUDA minor selectors. Wildcard run_cudf consumers can therefore resolve an arbitrary cuFile version, defeating the intended version-specific pinning. Add a compatible pin here or select an exact CUDA minor 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 `@dependencies.yaml` around lines 986 - 987, Pin the nvidia-cufile-cu12
dependency in the wildcard CUDA 12 configuration instead of leaving it
unversioned. Update the dependency entry adjacent to the cuda: "12.*" selector
to use a compatible explicit version, while preserving the existing
compatibility note and wildcard configuration.
🤖 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 `@dependencies.yaml`:
- Around line 986-987: Pin the nvidia-cufile-cu12 dependency in the wildcard
CUDA 12 configuration instead of leaving it unversioned. Update the dependency
entry adjacent to the cuda: "12.*" selector to use a compatible explicit
version, while preserving the existing compatibility note and wildcard
configuration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 232f8195-37a6-4575-9893-ddabc85ef193

📥 Commits

Reviewing files that changed from the base of the PR and between 7675c05 and 97cc690.

📒 Files selected for processing (1)
  • dependencies.yaml

@TomAugspurger

Copy link
Copy Markdown
Contributor

The cudf-polars-polars-test job failed with

ERROR: Cannot install -r polars/py-polars/requirements-ci.txt (line 6) because these package versions have conflicting dependencies.

The conflict is caused by:
    torch 2.13.0 depends on cuda-toolkit==13.0.3; platform_system == "Linux"
    torch 2.12.1 depends on cuda-toolkit==13.0.2; platform_system == "Linux"
    torch 2.12.0 depends on cuda-toolkit==13.0.2; platform_system == "Linux"
    torch 2.11.0 depends on cuda-toolkit==13.0.2; platform_system == "Linux"
    torch 2.10.0 depends on nvidia-cufile-cu12==1.13.1.3; platform_system == "Linux" and platform_machine == "x86_64"
    torch 2.9.1 depends on nvidia-cufile-cu12==1.13.1.3; platform_system == "Linux" and platform_machine == "x86_64"
    torch 2.9.0 depends on nvidia-cufile-cu12==1.13.1.3; platform_system == "Linux" and platform_machine == "x86_64"
    The user requested (constraint) cuda-toolkit==12.9.*
    The user requested (constraint) nvidia-cufile-cu12==1.14.1.1.*

Additionally, some packages in these conflicts have no matching distributions available for your environment:
    cuda-toolkit
    nvidia-cufile-cu12

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

Assuming we need cuda-toolkit 12.0, maybe we can patch that be something like

torch --index-url https://download.pytorch.org/whl/cu129

(maybe --extra-index-url?)

Alternatively, I suspect we're falling back for the relevant tests anyway, and so we could pass --ignore=py-polars/tests/unit/ml/test_torch.py to the pytest calls here and here.

Comment thread dependencies.yaml Outdated
@jameslamb jameslamb mentioned this pull request Jul 22, 2026
3 tasks
bdice and others added 2 commits July 22, 2026 08:49
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
Comment thread dependencies.yaml Outdated
@gforsyth gforsyth removed their assignment Jul 22, 2026
@Matt711
Matt711 requested a review from gforsyth July 22, 2026 17:04

@gforsyth gforsyth 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.

:shipit:

@Matt711

Matt711 commented Jul 22, 2026

Copy link
Copy Markdown
Member

/merge

@rapids-bot
rapids-bot Bot merged commit 629dcc4 into NVIDIA:release/26.08 Jul 22, 2026
138 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jul 22, 2026
rapids-bot Bot pushed a commit that referenced this pull request Aug 17, 2026
This fixes some wheel packaging issues in libcudf / cudf. The main goal is to declare the CUDA runtime libraries loaded by `libcudf` wheels: NVRTC and nvJitLink.

Previously we included an `nvcc` component which was needed by `numba-cuda`, but that is now handled through our dependency on `numba-cuda[cu12]` which includes the necessary CUDA wheels.

In #23392, we added a dependency on cuFile, but this was incorrect. cuDF doesn't use cuFile directly, it is only used through KvikIO. rapidsai/kvikio#1013 supplies the corresponding cuFile metadata for KvikIO, so we don't need that here.

This PR also adds an isolated `libcudf.load_library()` wheel smoke test before `pylibcudf` test extras are installed, so that test dependencies cannot mask missing `libcudf` wheel requirements. This kind of test revealed the issue in KvikIO's packaging, so we should add similar tests here.

Authors:
  - Bradley Dice (https://github.com/bdice)

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

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

Labels

bug Something isn't working cudf.pandas Issues specific to cudf.pandas libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants