diff --git a/python/cuml/cuml/accel/_overrides/sklearn/preprocessing.py b/python/cuml/cuml/accel/_overrides/sklearn/preprocessing.py index 24940a9e6f..389b9634dc 100644 --- a/python/cuml/cuml/accel/_overrides/sklearn/preprocessing.py +++ b/python/cuml/cuml/accel/_overrides/sklearn/preprocessing.py @@ -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) def _gpu_get_feature_names_out(self, input_features=None): """Return feature names for output features. diff --git a/python/cuml/cuml_accel_tests/integration/test_svc.py b/python/cuml/cuml_accel_tests/integration/test_svc.py index ca3de73381..4f7c480803 100644 --- a/python/cuml/cuml_accel_tests/integration/test_svc.py +++ b/python/cuml/cuml_accel_tests/integration/test_svc.py @@ -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) diff --git a/python/cuml/cuml_accel_tests/integration/test_tsvd.py b/python/cuml/cuml_accel_tests/integration/test_tsvd.py index 3912d6c0e3..eb87d193a0 100644 --- a/python/cuml/cuml_accel_tests/integration/test_tsvd.py +++ b/python/cuml/cuml_accel_tests/integration/test_tsvd.py @@ -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 @@ -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, diff --git a/python/cuml/tests/test_sklearn_compatibility.py b/python/cuml/tests/test_sklearn_compatibility.py index 58d8f50d7b..17a96f8c5d 100644 --- a/python/cuml/tests/test_sklearn_compatibility.py +++ b/python/cuml/tests/test_sklearn_compatibility.py @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/python/cuml/tests/test_sklearn_import_export.py b/python/cuml/tests/test_sklearn_import_export.py index e3ca75b356..c9a0d09319 100644 --- a/python/cuml/tests/test_sklearn_import_export.py +++ b/python/cuml/tests/test_sklearn_import_export.py @@ -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"])