Skip to content
Merged
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
8 changes: 4 additions & 4 deletions python/cuml/cuml/accel/_overrides/sklearn/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ def _check_targetencoder_y(y):
class TargetEncoder(ProxyBase):
_gpu_class = cuml.preprocessing.TargetEncoder

def _gpu_fit(self, X, y, **kwargs):
def _gpu_fit(self, X, y):
_check_targetencoder_y(y)
return self._gpu.fit(X, y, **kwargs)
return self._gpu.fit(X, y)

def _gpu_fit_transform(self, X, y, **kwargs):
def _gpu_fit_transform(self, X, y, **params):
_check_targetencoder_y(y)
return self._gpu.fit_transform(X, y, **kwargs)
return self._gpu.fit_transform(X, y, **params)
Comment thread
jcrist marked this conversation as resolved.

def _gpu_get_feature_names_out(self, input_features=None):
"""Return feature names for output features.
Expand Down
6 changes: 6 additions & 0 deletions python/cuml/cuml_accel_tests/integration/test_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def test_svc(binary):
assert svc.score(X, y) > 0.5


@pytest.mark.filterwarnings(
"ignore:The `probability` parameter was deprecated:FutureWarning"
)
@pytest.mark.filterwarnings(
"ignore:Attribute `prob[AB]_` was deprecated:FutureWarning"
)
def test_svc_probability(binary):
X, y = binary
svc = SVC(probability=True).fit(X, y)
Expand Down
14 changes: 12 additions & 2 deletions python/cuml/cuml_accel_tests/integration/test_tsvd.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
#

import numpy as np
import pytest
import sklearn
from packaging.version import Version
from scipy.sparse import csr_matrix
from sklearn.datasets import make_classification
from sklearn.decomposition import TruncatedSVD
Expand Down Expand Up @@ -100,11 +102,19 @@ def test_truncated_svd_tol(svd_data, tol):


@pytest.mark.parametrize(
"power_iteration_normalizer", ["auto", "OR", "LU", "none"]
"power_iteration_normalizer", ["auto", "QR", "LU", "none"]
)
def test_truncated_svd_power_iteration_normalizer(
svd_data, power_iteration_normalizer
):
if (
Version(sklearn.__version__) < Version("1.9.0.dev0")
and power_iteration_normalizer == "QR"
):
pytest.skip(
"power_iteration_normalizer 'QR' is not supported in scikit-learn < 1.9.0"
)

X, _ = svd_data
svd = TruncatedSVD(
n_components=10,
Expand Down
5 changes: 0 additions & 5 deletions python/cuml/tests/test_sklearn_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
},
KernelDensity: {
"check_estimator_tags_renamed": "No support for modern tags infrastructure",
"check_all_zero_sample_weights_error": "KernelDensity does not validate all-zero sample weights",
},
EmpiricalCovariance: {
"check_estimator_tags_renamed": "No support for modern tags infrastructure",
Expand Down Expand Up @@ -247,7 +246,6 @@
"check_sample_weights_not_an_array": "sample_weight not implemented",
"check_sample_weights_shape": "sample_weight not implemented",
"check_sample_weight_equivalence_on_dense_data": "sample_weight not implemented",
"check_all_zero_sample_weights_error": "sample_weight not implemented",
"check_sample_weights_list": "sample_weight not implemented",
"check_sample_weights_not_overwritten": "sample_weight not implemented",
"check_sample_weight_equivalence_on_sparse_data": "sample_weight not implemented",
Expand All @@ -260,7 +258,6 @@
"check_sample_weights_not_an_array": "sample_weight not implemented",
"check_sample_weights_shape": "sample_weight not implemented",
"check_sample_weight_equivalence_on_dense_data": "sample_weight not implemented",
"check_all_zero_sample_weights_error": "sample_weight not implemented",
"check_sample_weights_list": "sample_weight not implemented",
"check_sample_weights_not_overwritten": "sample_weight not implemented",
"check_sample_weight_equivalence_on_sparse_data": "sample_weight not implemented",
Expand All @@ -273,7 +270,6 @@
"check_sample_weights_not_an_array": "sample_weight not implemented",
"check_sample_weights_shape": "sample_weight not implemented",
"check_sample_weight_equivalence_on_dense_data": "sample_weight not implemented",
"check_all_zero_sample_weights_error": "sample_weight not implemented",
"check_sample_weights_list": "sample_weight not implemented",
"check_sample_weights_not_overwritten": "sample_weight not implemented",
"check_sample_weight_equivalence_on_sparse_data": "sample_weight not implemented",
Expand All @@ -286,7 +282,6 @@
"check_sample_weights_not_an_array": "sample_weight not implemented",
"check_sample_weights_shape": "sample_weight not implemented",
"check_sample_weight_equivalence_on_dense_data": "sample_weight not implemented",
"check_all_zero_sample_weights_error": "sample_weight not implemented",
"check_sample_weights_list": "sample_weight not implemented",
"check_sample_weights_not_overwritten": "sample_weight not implemented",
"check_sample_weight_equivalence_on_sparse_data": "sample_weight not implemented",
Expand Down
3 changes: 3 additions & 0 deletions python/cuml/tests/test_sklearn_import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ def test_svr(random_state, sparse, kernel):
@pytest.mark.filterwarnings(
"ignore:The `probability` parameter was deprecated:FutureWarning"
)
@pytest.mark.filterwarnings(
"ignore:Attribute `prob[AB]_` was deprecated:FutureWarning"
)
@pytest.mark.parametrize("sparse", [False, True])
@pytest.mark.parametrize("probability", [False, True])
@pytest.mark.parametrize("kernel", ["rbf", "precomputed"])
Expand Down
Loading