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

Remove deprecated target_weights in UMAP #4081

Merged
merged 1 commit into from
Jul 27, 2021
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
14 changes: 2 additions & 12 deletions python/cuml/manifold/umap.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ class UMAP(Base,
hash_input=False,
random_state=None,
callback=None,
output_type=None,
target_weights=None):
output_type=None):

super().__init__(handle=handle,
verbose=verbose,
Expand Down Expand Up @@ -389,16 +388,7 @@ class UMAP(Base,
self.negative_sample_rate = negative_sample_rate
self.transform_queue_size = transform_queue_size
self.target_n_neighbors = target_n_neighbors
if target_weights is not None:
import warnings
warnings.warn("Parameter 'target_weights' is deprecated and"
" will be removed in 21.08. Please use"
" 'target_weight' instead. Setting 'target_weight'"
" as the curent 'target_weights' value",
DeprecationWarning)
self.target_weight = target_weights
else:
self.target_weight = target_weight
self.target_weight = target_weight

self.deterministic = random_state is not None

Expand Down
3 changes: 0 additions & 3 deletions python/cuml/test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ def test_base_children_get_param_names(child_class: str):

# Now ensure the base parameters are included in get_param_names
for name, param in sig.parameters.items():
if child_class == 'UMAP' and name == 'target_weights':
continue # Temporary fix to be removed in 21.08. See #3914

if (param.kind == inspect.Parameter.VAR_KEYWORD
or param.kind == inspect.Parameter.VAR_POSITIONAL):
continue
Expand Down