Add verify-dependencies check#145
Open
KyleFromNVIDIA wants to merge 8 commits into
Open
Conversation
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
verify-use-cuda-wheels checkverify-dependencies check
jameslamb
requested changes
Jul 21, 2026
jameslamb
left a comment
Member
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This check makes sure that
dependencies.yamlfollows RAPIDS conventions. For now, it just makes sure that certain packages that pull in the CTK are inspecificdependency set matrices withuse_cuda_wheels: "true", to ensure that the CTK is only pulled in if requested.Issue: #132