From 16be91aee50277ea24d2b7abb73a18b70888973e Mon Sep 17 00:00:00 2001 From: Mickael Ide Date: Thu, 22 Jul 2021 16:43:00 +0200 Subject: [PATCH] Remove deprecated target_weights in UMAP --- python/cuml/manifold/umap.pyx | 14 ++------------ python/cuml/test/test_base.py | 3 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/python/cuml/manifold/umap.pyx b/python/cuml/manifold/umap.pyx index 3f3e92bc10..96a857fb2c 100644 --- a/python/cuml/manifold/umap.pyx +++ b/python/cuml/manifold/umap.pyx @@ -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, @@ -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 diff --git a/python/cuml/test/test_base.py b/python/cuml/test/test_base.py index 6bc2b9e119..433cc118f7 100644 --- a/python/cuml/test/test_base.py +++ b/python/cuml/test/test_base.py @@ -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