Skip to content

Commit

Permalink
Refactor dependencies.yaml to use depends-on pattern. (rapidsai#321)
Browse files Browse the repository at this point in the history
This refactors cuvs's `dependencies.yaml` to follow a convention we've established in other repos. For RAPIDS packages we declare a `depends_on_X` dependency list, and use that rather than specifying packages multiple times. This enables more reuse and easier automation for version migrations.

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

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

URL: rapidsai#321
  • Loading branch information
bdice authored Sep 11, 2024
1 parent c40abae commit 2124789
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 54 deletions.
1 change: 1 addition & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ DEPENDENCIES=(
dask-cuda
cuvs
pylibraft
librmm
rmm
rapids-dask-dependency
)
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- libcusolver=11.4.1.48
- libcusparse-dev=11.7.5.86
- libcusparse=11.7.5.86
- librmm==24.10.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand All @@ -49,7 +50,6 @@ dependencies:
- pytest==7.*
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- recommonmark
- rmm==24.10.*,>=0.0.0a0
- rust
- scikit-build-core>=0.10.0
- scikit-learn
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- libcusolver=11.4.1.48
- libcusparse-dev=11.7.5.86
- libcusparse=11.7.5.86
- librmm==24.10.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand All @@ -49,7 +50,6 @@ dependencies:
- pytest==7.*
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- recommonmark
- rmm==24.10.*,>=0.0.0a0
- rust
- scikit-build-core>=0.10.0
- scikit-learn
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-125_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- librmm==24.10.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand All @@ -45,7 +46,6 @@ dependencies:
- pytest==7.*
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- recommonmark
- rmm==24.10.*,>=0.0.0a0
- rust
- scikit-build-core>=0.10.0
- scikit-learn
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- librmm==24.10.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand All @@ -45,7 +46,6 @@ dependencies:
- pytest==7.*
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- recommonmark
- rmm==24.10.*,>=0.0.0a0
- rust
- scikit-build-core>=0.10.0
- scikit-learn
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/bench_ann_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies:
- libcusolver=11.4.1.48
- libcusparse-dev=11.7.5.86
- libcusparse=11.7.5.86
- librmm==24.10.*,>=0.0.0a0
- matplotlib
- nccl>=2.9.9
- ninja
Expand All @@ -42,6 +43,5 @@ dependencies:
- pandas
- pylibraft==24.10.*,>=0.0.0a0
- pyyaml
- rmm==24.10.*,>=0.0.0a0
- sysroot_linux-aarch64==2.17
name: bench_ann_cuda-118_arch-aarch64
2 changes: 1 addition & 1 deletion conda/environments/bench_ann_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies:
- libcusolver=11.4.1.48
- libcusparse-dev=11.7.5.86
- libcusparse=11.7.5.86
- librmm==24.10.*,>=0.0.0a0
- matplotlib
- nccl>=2.9.9
- ninja
Expand All @@ -42,6 +43,5 @@ dependencies:
- pandas
- pylibraft==24.10.*,>=0.0.0a0
- pyyaml
- rmm==24.10.*,>=0.0.0a0
- sysroot_linux-64==2.17
name: bench_ann_cuda-118_arch-x86_64
2 changes: 1 addition & 1 deletion conda/environments/bench_ann_cuda-125_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- librmm==24.10.*,>=0.0.0a0
- matplotlib
- nccl>=2.9.9
- ninja
Expand All @@ -38,6 +39,5 @@ dependencies:
- pandas
- pylibraft==24.10.*,>=0.0.0a0
- pyyaml
- rmm==24.10.*,>=0.0.0a0
- sysroot_linux-aarch64==2.17
name: bench_ann_cuda-125_arch-aarch64
2 changes: 1 addition & 1 deletion conda/environments/bench_ann_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- librmm==24.10.*,>=0.0.0a0
- matplotlib
- nccl>=2.9.9
- ninja
Expand All @@ -38,6 +39,5 @@ dependencies:
- pandas
- pylibraft==24.10.*,>=0.0.0a0
- pyyaml
- rmm==24.10.*,>=0.0.0a0
- sysroot_linux-64==2.17
name: bench_ann_cuda-125_arch-x86_64
98 changes: 54 additions & 44 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ files:
- build_py_cuvs
- cuda
- cuda_version
- depends_on_pylibraft
- depends_on_librmm
- develop
- checks
- build_wheels
Expand All @@ -31,6 +33,8 @@ files:
- build_py_cuvs
- cuda
- cuda_version
- depends_on_pylibraft
- depends_on_librmm
- develop
- bench
- bench_python
Expand Down Expand Up @@ -93,6 +97,7 @@ files:
includes:
- cuda_wheels
- run_py_cuvs
- depends_on_pylibraft
py_test_py_cuvs:
output: pyproject
pyproject_dir: python/cuvs
Expand Down Expand Up @@ -193,15 +198,7 @@ dependencies:
common:
- output_types: [conda]
packages:
- &rmm_unsuffixed rmm==24.10.*,>=0.0.0a0
- &pylibraft_unsuffixed pylibraft==24.10.*,>=0.0.0a0
- dlpack>=0.8,<1.0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
# This index is needed for rmm-cu{11,12}.
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [conda, requirements, pyproject]
matrices:
Expand All @@ -216,21 +213,6 @@ dependencies:
- matrix:
packages:
- &cuda_python cuda-python
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- &rmm_cu12 rmm-cu12==24.10.*,>=0.0.0a0
- &pylibraft_cu12 pylibraft-cu12==24.10.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- &rmm_cu11 rmm-cu11==24.10.*,>=0.0.0a0
- &pylibraft_cu11 pylibraft-cu11==24.10.*,>=0.0.0a0
- {matrix: null, packages: [*rmm_unsuffixed, *pylibraft_unsuffixed] }
checks:
common:
- output_types: [conda, requirements]
Expand Down Expand Up @@ -448,19 +430,9 @@ dependencies:
- python>=3.10,<3.13
run_py_cuvs:
common:
- output_types: [conda, pyproject]
- output_types: [conda, requirements, pyproject]
packages:
- &numpy numpy>=1.23,<3.0a0
- output_types: [conda]
packages:
- *rmm_unsuffixed
- *pylibraft_unsuffixed
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
# This index is needed for cudf and rmm.
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [conda, requirements, pyproject]
matrices:
Expand All @@ -475,15 +447,6 @@ dependencies:
- matrix:
packages:
- *cuda_python
- output_types: [requirements, pyproject]
matrices:
- matrix: {cuda: "12.*"}
packages:
- *pylibraft_cu12
- matrix: {cuda: "11.*"}
packages:
- *pylibraft_cu11
- {matrix: null, packages: [*pylibraft_unsuffixed]}
test_python_common:
common:
- output_types: [conda, requirements, pyproject]
Expand All @@ -505,7 +468,6 @@ dependencies:
- h5py>=3.8.0
- benchmark>=1.8.2
- openblas
- *rmm_unsuffixed
bench_python:
common:
- output_types: [conda]
Expand All @@ -515,3 +477,51 @@ dependencies:
- pyyaml
- pandas
- click
depends_on_librmm:
common:
- output_types: conda
packages:
- &librmm_unsuffixed librmm==24.10.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- librmm-cu12==24.10.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- librmm-cu11==24.10.*,>=0.0.0a0
- {matrix: null, packages: [*librmm_unsuffixed]}
depends_on_pylibraft:
common:
- output_types: conda
packages:
- &pylibraft_unsuffixed pylibraft==24.10.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- pylibraft-cu12==24.10.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- pylibraft-cu11==24.10.*,>=0.0.0a0
- {matrix: null, packages: [*pylibraft_unsuffixed]}
2 changes: 0 additions & 2 deletions python/cuvs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ requires = [
"cuda-python",
"cython>=3.0.0",
"ninja",
"pylibraft==24.10.*,>=0.0.0a0",
"rmm==24.10.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
build-backend = "scikit_build_core.build"
dependencies-file = "../../dependencies.yaml"
Expand Down

0 comments on commit 2124789

Please sign in to comment.