Skip to content

Add verify-dependencies check#145

Open
KyleFromNVIDIA wants to merge 8 commits into
rapidsai:mainfrom
KyleFromNVIDIA:verify-use-cuda-wheels
Open

Add verify-dependencies check#145
KyleFromNVIDIA wants to merge 8 commits into
rapidsai:mainfrom
KyleFromNVIDIA:verify-use-cuda-wheels

Conversation

@KyleFromNVIDIA

@KyleFromNVIDIA KyleFromNVIDIA commented Jul 21, 2026

Copy link
Copy Markdown
Member

This check makes sure that dependencies.yaml follows RAPIDS conventions. For now, it just makes sure that certain packages that pull in the CTK are in specific dependency set matrices with use_cuda_wheels: "true", to ensure that the CTK is only pulled in if requested.

Issue: #132

This check makes sure that certain packages that pull in the CTK
are in `specific` dependency set matrices with
`use_cuda_wheels: "true"`, to ensure that the CTK is only pulled in
if requested.

Issue: rapidsai#132
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from jameslamb July 21, 2026 18:33
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from a team as a code owner July 21, 2026 18:33
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from a team as a code owner July 21, 2026 18:36
@KyleFromNVIDIA KyleFromNVIDIA changed the title Add verify-use-cuda-wheels check Add verify-dependencies check Jul 21, 2026

@jameslamb jameslamb left a comment

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'm good with the naming, no strong opinions about any of the code changes.

I tested in cuvs with a diff like this:

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index aa65eec1..a1db389c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -116,6 +116,12 @@ repos:
                     ^CHANGELOG[.]md$|
                     ^cpp/cmake/patches/cutlass/build-export[.]patch$|
                     ^rust/cuvs-sys/src/bindings[.]rs$
+      - repo: https://github.com/KyleFromNVIDIA/pre-commit-hooks
+        rev: verify-use-cuda-wheels
+        hooks:
+          - id: verify-dependencies
+            name: verify-dependencies
+            args: [--fix]
       - repo: https://github.com/rapidsai/pre-commit-hooks
         rev: v1.6.0
         hooks:
diff --git a/dependencies.yaml b/dependencies.yaml
index d9221076..45af8307 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -343,7 +343,6 @@ dependencies:
           - matrix:
               arch: aarch64
               cuda: "12.2"
-              use_cuda_wheels: "true"
             packages:
               # some components (like nvidia-cublas-cu12 and nvidia-cuda-nvcc-cu12) didn't have
               # aarch64 wheels until CTK 12.3, so allow a slightly looser bound here
@@ -420,7 +419,6 @@ dependencies:
           # ref: https://github.com/rapidsai/cudf/pull/20873
           - matrix:
               cuda: "12.9"
-              use_cuda_wheels: "true"
             packages:
               - cuda-toolkit[cublas,curand,cusolver,cusparse,nvrtc]==12.*
               - nvidia-nvjitlink-cu12>=12.9,<13

The output looked good to me.

$ pre-commit run --all-files verify-dependencies
verify-dependencies......................................................Failed
- hook id: verify-dependencies
- exit code: 1

In file dependencies.yaml:349:17:
               - cuda-toolkit>=12.2,<12.4
warning: package "cuda-toolkit" in specific dependency set without 
use_cuda_wheels: "true"

In file dependencies.yaml:343:13:
           - matrix:
note: place in a specific dependency set with use_cuda_wheels: "true" instead

In file dependencies.yaml:423:17:
               - cuda-toolkit[cublas,curand,cusolver,cusparse,nvrtc]==12.*
warning: package "cuda-toolkit" in specific dependency set without 
use_cuda_wheels: "true"

Just left one suggestion, there are more cases of this particular check that I think we'll want to catch.

Comment thread src/rapids_pre_commit_hooks/dependencies/use_cuda_wheels.py Outdated
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from jameslamb July 22, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants