Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple CPU interop fixes for serialization and cloning #6223

Draft
wants to merge 1 commit into
base: branch-25.02
Choose a base branch
from
Draft
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: 2 additions & 2 deletions python/cuml/cuml/cluster/hdbscan/hdbscan.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ class HDBSCAN(UniversalBase, ClusterMixin, CMajorInputTagMixin):
"""
Fit HDBSCAN model from features.
"""

self._all_finite = True
X_m, n_rows, n_cols, self.dtype = \
input_to_cuml_array(X, order='C',
check_dtype=[np.float32],
Expand Down Expand Up @@ -1163,7 +1163,7 @@ class HDBSCAN(UniversalBase, ClusterMixin, CMajorInputTagMixin):
def get_attr_names(self):
attr_names = ['labels_', 'probabilities_', 'cluster_persistence_',
'condensed_tree_', 'single_linkage_tree_',
'outlier_scores_']
'outlier_scores_', '_all_finite']
if self.gen_min_span_tree:
attr_names = attr_names + ['minimum_spanning_tree_']
if self.prediction_data:
Expand Down
4 changes: 4 additions & 0 deletions python/cuml/cuml/experimental/accel/estimator_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from cuml.internals import logger
from cuml.internals.global_settings import GlobalSettings
from cuml.internals.safe_imports import gpu_only_import, cpu_only_import
from sklearn.base import _clone_parametrized
from typing import Optional, Tuple, Dict, Any, Type, List


Expand Down Expand Up @@ -277,6 +278,9 @@ def __reduce__(self):
),
)

def __sklearn_clone__(self):
return _clone_parametrized(self)

logger.debug(
f"Created proxy estimator: ({module_b}, {original_class_name}, {ProxyEstimator})"
)
Expand Down
Loading