Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ ivf_pq_index

# java
.classpath

*.csv
*.txt

362 changes: 181 additions & 181 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,185 +2,185 @@
# SPDX-License-Identifier: Apache-2.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-json
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-symlinks
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
# Use the config file specific to each subproject so that each
# project can specify its own first/third-party packages.
args: ["--config-root=python/", "--resolve-all-configs"]
files: python/.*
types: [cython]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.19.1'
hooks:
- id: mypy
additional_dependencies: [types-cachetools]
args: ["--config-file=pyproject.toml",
"python/cuvs/cuvs",
"cpp/cmake/modules",
"cpp/tests/python"]
pass_filenames: false
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
# https://github.com/PyCQA/pydocstyle/issues/603
additional_dependencies: [toml]
args: ["--config=pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.4
hooks:
- id: clang-format
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: local
hooks:
- id: no-deprecationwarning
name: no-deprecationwarning
description: 'Enforce that DeprecationWarning is not introduced (use FutureWarning instead)'
entry: '(category=|\s)DeprecationWarning[,)]'
language: pygrep
types_or: [python, cython]
- id: cmake-format
name: cmake-format
entry: ./cpp/scripts/run-cmake-format.sh cmake-format
language: python
types: [cmake]
exclude: .*/thirdparty/.*|.*FindAVX.cmake.*
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
- cmakelang==0.6.13
verbose: true
require_serial: true
- id: cmake-lint
name: cmake-lint
entry: ./cpp/scripts/run-cmake-format.sh cmake-lint
language: python
types: [cmake]
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
- cmakelang==0.6.13
verbose: true
require_serial: true
exclude: .*/thirdparty/.*
- id: include-check
name: include-check
entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/tests
pass_filenames: false
language: python
additional_dependencies: [gitpython]
- id: cargo-fmt
name: cargo-fmt
entry: cargo fmt --manifest-path rust/Cargo.toml --all
pass_filenames: false
files: rust/.*
language: rust
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml"]
exclude: |
(?x)
^CHANGELOG[.]md$|
^cpp/cmake/patches/cutlass/build-export[.]patch$
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.3.3
hooks:
- id: verify-copyright
name: verify-copyright-cuvs
args: [--fix, --spdx]
files: |
(?x)
[.](cmake|c|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|rs|java)$|
CMakeLists[.]txt$|
CMakeLists_standalone[.]txt$|
meta[.]yaml$|
pyproject[.]toml$|
^python/cuvs_bench/cuvs_bench/split_groundtruth/split_groundtruth[.]pl$|
Dockerfile$|
pom[.]xml$|
^java/cuvs-java/src/assembly/native-with-deps[.]xml$|
^java/docker-build/build-in-docker$|
^java/docker-build/run-in-docker$|
^[.]flake8$|
recipe[.]yaml$|
^[.]pre-commit-config[.]yaml$
exclude: |
(?x)^(
docs/source/sphinxext/github_link[.]py$|
cpp/cmake/modules/FindAVX[.]cmake$|
cpp/src/neighbors/detail/faiss_distance_utils[.]h$|
cpp/src/distance/detail/fused_distance_nn/gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_normvec_smem[.]h$|
cpp/src/distance/detail/fused_distance_nn/persistent_gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue_elementwise[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_reduced_vec[.]h$|
cpp/src/distance/detail/fused_distance_nn/custom_epilogue_with_broadcast[.]h$
)
- id: verify-copyright
name: verify-copyright-scikit-learn
args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"]
files: |
(?x)^(
docs/source/sphinxext/github_link[.]py$
)
- id: verify-copyright
name: verify-copyright-cutlass
args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"]
files: |
(?x)^(
cpp/src/distance/detail/fused_distance_nn/gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_normvec_smem[.]h$|
cpp/src/distance/detail/fused_distance_nn/persistent_gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue_elementwise[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_reduced_vec[.]h$|
cpp/src/distance/detail/fused_distance_nn/custom_epilogue_with_broadcast[.]h$
)
- id: verify-copyright
name: verify-copyright-faiss
args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND MIT"]
files: |
(?x)^(
cpp/src/neighbors/detail/faiss_distance_utils[.]h$
)
- id: verify-alpha-spec
- id: verify-codeowners
args: [--fix, --project-prefix=cuvs]
- id: verify-pyproject-license
# ignore the top-level pyproject.toml, which doesn't
# have or need a [project] table
exclude: |
(?x)
^pyproject[.]toml$
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.20.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean", "--warn-all", "--strict"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-json
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-symlinks
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
# Use the config file specific to each subproject so that each
# project can specify its own first/third-party packages.
args: ["--config-root=python/", "--resolve-all-configs"]
files: python/.*
types: [cython]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.19.1'
hooks:
- id: mypy
additional_dependencies: [types-cachetools]
args: ["--config-file=pyproject.toml", "python/cuvs/cuvs", "cpp/cmake/modules", "cpp/tests/python"]
pass_filenames: false
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
# https://github.com/PyCQA/pydocstyle/issues/603
additional_dependencies: [toml]
args: ["--config=pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.4
hooks:
- id: clang-format
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: local
hooks:
- id: no-deprecationwarning
name: no-deprecationwarning
description: 'Enforce that DeprecationWarning is not introduced (use FutureWarning instead)'
entry: '(category=|\s)DeprecationWarning[,)]'
language: pygrep
types_or: [python, cython]
- id: cmake-format
name: cmake-format
entry: ./cpp/scripts/run-cmake-format.sh cmake-format
language: python
types: [cmake]
exclude: .*/thirdparty/.*|.*FindAVX.cmake.*
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
- cmakelang==0.6.13
verbose: true
require_serial: true
- id: cmake-lint
name: cmake-lint
entry: ./cpp/scripts/run-cmake-format.sh cmake-lint
language: python
types: [cmake]
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
- cmakelang==0.6.13
verbose: true
require_serial: true
exclude: .*/thirdparty/.*
- id: include-check
name: include-check
entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/tests
pass_filenames: false
language: python
additional_dependencies: [gitpython]
- id: cargo-fmt
name: cargo-fmt
entry: cargo fmt --manifest-path rust/Cargo.toml --all
pass_filenames: false
files: rust/.*
language: rust
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml"]
exclude: |
(?x)
^CHANGELOG[.]md$|
^cpp/cmake/patches/cutlass/build-export[.]patch$
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.3.3
hooks:
- id: verify-copyright
name: verify-copyright-cuvs
args: [--fix, --spdx]
files: |
(?x)
[.](cmake|c|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|rs|java)$|
CMakeLists[.]txt$|
CMakeLists_standalone[.]txt$|
meta[.]yaml$|
pyproject[.]toml$|
^python/cuvs_bench/cuvs_bench/split_groundtruth/split_groundtruth[.]pl$|
Dockerfile$|
pom[.]xml$|
^java/cuvs-java/src/assembly/native-with-deps[.]xml$|
^java/docker-build/build-in-docker$|
^java/docker-build/run-in-docker$|
^[.]flake8$|
recipe[.]yaml$|
^[.]pre-commit-config[.]yaml$
exclude: |
(?x)^(
docs/source/sphinxext/github_link[.]py$|
cpp/cmake/modules/FindAVX[.]cmake$|
cpp/src/neighbors/detail/faiss_distance_utils[.]h$|
cpp/src/distance/detail/fused_distance_nn/gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_normvec_smem[.]h$|
cpp/src/distance/detail/fused_distance_nn/persistent_gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue_elementwise[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_reduced_vec[.]h$|
cpp/src/distance/detail/fused_distance_nn/custom_epilogue_with_broadcast[.]h$
)
- id: verify-copyright
name: verify-copyright-scikit-learn
args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"]
files: |
(?x)^(
docs/source/sphinxext/github_link[.]py$
)
- id: verify-copyright
name: verify-copyright-cutlass
args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"]
files: |
(?x)^(
cpp/src/distance/detail/fused_distance_nn/gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_normvec_smem[.]h$|
cpp/src/distance/detail/fused_distance_nn/persistent_gemm[.]h$|
cpp/src/distance/detail/fused_distance_nn/epilogue_elementwise[.]cuh$|
cpp/src/distance/detail/fused_distance_nn/predicated_tile_iterator_reduced_vec[.]h$|
cpp/src/distance/detail/fused_distance_nn/custom_epilogue_with_broadcast[.]h$
)
- id: verify-copyright
name: verify-copyright-faiss
args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND MIT"]
files: |
(?x)^(
cpp/src/neighbors/detail/faiss_distance_utils[.]h$
)
- id: verify-alpha-spec
args:
- --fix
- --mode
- release
- id: verify-codeowners
args: [--fix, --project-prefix=cuvs]
- id: verify-pyproject-license
# ignore the top-level pyproject.toml, which doesn't
# have or need a [project] table
exclude: |
(?x)
^pyproject[.]toml$
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.20.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean", "--warn-all", "--strict"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
default_language_version:
python: python3
python: python3
Binary file added cagra_test/.cagra_sift1m.py.swn
Binary file not shown.
Binary file added cagra_test/.cagra_sift1m.py.swo
Binary file not shown.
Loading
Loading