Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
16 changes: 14 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

repos:
Expand Down Expand Up @@ -107,7 +107,7 @@ repos:
args: ['format', '--cleanup']
additional_dependencies: ['pyyaml>=6.0', 'packaging>=21.0']
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.1.0
rev: v1.3.3
hooks:
- id: verify-copyright
name: verify-copyright-cuml
Expand Down Expand Up @@ -164,6 +164,18 @@ repos:
- id: verify-alpha-spec
- id: verify-codeowners
args: [--fix, --project-prefix=cuml]
- id: verify-hardcoded-version
exclude: |
(?x)
devcontainer[.]json$|
dependencies[.]yaml$|
^[.]github/workflows/|
[.]md$|
pom[.]xml$|
^[.]pre-commit-config[.]yaml$|
[.]rst$|
^conda/environments/|
[.](png|gz)$
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.20.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions python/cuml/cuml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def __getattr__(name):
from pylibraft.common import Handle

warnings.warn(
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"cuml.Handle was deprecated in 26.02 and will be removed in 26.04. "
"There is no need to manually specify a `handle`, cuml now manages "
"this resource for you automatically.",
Expand Down
3 changes: 2 additions & 1 deletion python/cuml/cuml/internals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
#
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
# TODO: remove in 26.04
import cuml.internals.memory_utils
from cuml.internals.base import Base, get_handle
Expand Down
2 changes: 2 additions & 0 deletions python/cuml/cuml/internals/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __set__(self, obj, value):
suffix = ""
warnings.warn(
f"The `handle` argument to `{type(obj).__name__}` was deprecated "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
f"in 26.02 and will be removed in 26.04. There is no need to "
f"manually specify a `handle`, cuml now manages this resource "
f"for you automatically.{suffix}",
Expand Down Expand Up @@ -75,6 +76,7 @@ def get_handle(*, handle=None, model=None, n_streams=0, device_ids=None):
warnings.warn(
(
"The `handle` argument was deprecated in 26.02 and will be "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"removed in 26.04. There is no need to manually specify a "
"`handle`, cuml manages this resource for you automatically."
),
Expand Down
3 changes: 2 additions & 1 deletion python/cuml/cuml/internals/memory_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
#
def __getattr__(name):
Expand All @@ -8,6 +8,7 @@ def __getattr__(name):
if name in ("set_global_output_type", "using_output_type"):
warnings.warn(
f"Accessing {name!r} from the `cuml.internals.memory_utils` "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
f"namespace is deprecated and will be removed in 26.04. Please "
f"use `cuml.{name}` instead.",
FutureWarning,
Expand Down
2 changes: 2 additions & 0 deletions python/cuml/cuml/manifold/umap/umap.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ cdef init_params(self, lib.UMAPParams &params, n_rows, is_sparse=False, is_fit=T
if "nnd_n_clusters" in build_kwds:
warnings.warn(
"`nnd_n_clusters` was deprecated in 26.02 and will be changed to "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"`knn_n_clusters` in 26.04."
)
n_clusters = build_kwds.get("nnd_n_clusters", 1)
Expand All @@ -571,6 +572,7 @@ cdef init_params(self, lib.UMAPParams &params, n_rows, is_sparse=False, is_fit=T
if "nnd_overlap_factor" in build_kwds:
warnings.warn(
"`nnd_overlap_factor` was deprecated in 26.02 and will be changed to "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"`knn_overlap_factor` in 26.04."
)
overlap_factor = build_kwds.get("nnd_overlap_factor", 2)
Expand Down
1 change: 1 addition & 0 deletions python/cuml/cuml/model_selection/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def train_test_split(
if y_was_passed or y_is_column_name_positional:
warnings.warn(
"The explicit 'y' parameter is deprecated and will be "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"removed in 26.04. Extract the column manually: "
"X, y = df.drop('col', axis=1), df['col']",
FutureWarning,
Expand Down
1 change: 1 addition & 0 deletions python/cuml/cuml/preprocessing/TargetEncoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ def _impute_and_sort(self, df):
if not _COMBINATION_MODE_1D_WARNING_SHOWN:
warnings.warn(
"TargetEncoder currently returns 1D output for combination mode "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"(multi_feature_mode='combination'). In version 26.04, the output "
"will change to 2D (n_samples, n_output_features) for consistency "
"with sklearn. Use .ravel() if you need 1D output.",
Expand Down
1 change: 1 addition & 0 deletions python/cuml/cuml/svm/svm_base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ class SVMBase(Base,
warnings.warn(
(
"Passing `TotalIters` to `max_iter` was deprecated in 26.02 "
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
"and will be removed in 26.04. `max_iter` now always places a "
"limit on total iterations, please pass an integer directly "
"instead of wrapping with `TotalIters`."
Expand Down
1 change: 1 addition & 0 deletions python/cuml/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ filterwarnings = [
"ignore:Tensorflow not installed.*:ImportWarning:umap",
# From sklearn estimator checks
"ignore:Estimator .* does not inherit from.*:UserWarning",
# rapids-pre-commit-hooks: disable-next-line[verify-hardcoded-version]
# TargetEncoder combination mode deprecation (will change to 2D output in 26.04)
"ignore:TargetEncoder currently returns 1D output:FutureWarning",
# From numba - GPU under-utilization warnings in tests with small data
Expand Down