Skip to content

Commit

Permalink
FIX remove changes to dask estimators
Browse files Browse the repository at this point in the history
  • Loading branch information
dantegd committed Oct 8, 2024
1 parent 4a1a7bc commit 9eb0255
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 31 deletions.
2 changes: 1 addition & 1 deletion python/cuml/cuml/cluster/hdbscan/hdbscan.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
7 changes: 3 additions & 4 deletions python/cuml/cuml/dask/cluster/dbscan.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -160,6 +160,5 @@ def fit_predict(self, X, out_dtype="int32"):
self.fit(X, out_dtype)
return self.get_combined_model().labels_

@classmethod
def get_param_names(cls):
return list(self.kwargs.keys())
def get_param_names(self):
return list(cls.kwargs.keys())
3 changes: 1 addition & 2 deletions python/cuml/cuml/dask/cluster/kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,5 @@ def score(self, X, sample_weight=None):
cp.asarray(self.client.compute(scores, sync=True)) * -1.0
)

@classmethod
def get_param_names(cls):
def get_param_names(self):
return list(self.kwargs.keys())
5 changes: 2 additions & 3 deletions python/cuml/cuml/dask/decomposition/pca.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -215,8 +215,7 @@ def inverse_transform(self, X, delayed=True):
"""
return self._inverse_transform(X, n_dims=2, delayed=delayed)

@classmethod
def get_param_names(cls):
def get_param_names(self):
return list(self.kwargs.keys())

@staticmethod
Expand Down
5 changes: 2 additions & 3 deletions python/cuml/cuml/dask/decomposition/tsvd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -177,8 +177,7 @@ def inverse_transform(self, X, delayed=True):
"""
return self._inverse_transform(X, n_dims=2, delayed=delayed)

@classmethod
def get_param_names(cls):
def get_param_names(self):
return list(self.kwargs.keys())

@staticmethod
Expand Down
5 changes: 2 additions & 3 deletions python/cuml/cuml/dask/linear_model/linear_regression.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -106,8 +106,7 @@ def predict(self, X, delayed=True):
"""
return self._predict(X, delayed=delayed)

@classmethod
def get_param_names(cls):
def get_param_names(self):
return list(self.kwargs.keys())

@staticmethod
Expand Down
5 changes: 2 additions & 3 deletions python/cuml/cuml/dask/linear_model/ridge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -114,8 +114,7 @@ def predict(self, X, delayed=True):
"""
return self._predict(X, delayed=delayed)

@classmethod
def get_param_names(cls):
def get_param_names(self):
return list(self.kwargs.keys())

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/decomposition/incremental_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def transform(self, X, convert_dtype=False) -> CumlArray:
@classmethod
def get_param_names(cls):
# Skip super() since we dont pass any extra parameters in __init__
return Base.get_param_names(self) + self._hyperparams
return Base.get_param_names() + self._hyperparams


def _validate_sparse_input(X):
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/feature_extraction/_tfidf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/internals/base.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/linear_model/elastic_net.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/linear_model/lasso.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/neighbors/kneighbors_classifier.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/neighbors/kneighbors_regressor.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/svm/linear.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/svm/linear_svc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/svm/linear_svr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/svm/svm_base.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/cuml/tsa/holtwinters.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 9eb0255

Please sign in to comment.