diff --git a/python/cuvs/cuvs/neighbors/nn_descent/nn_descent.pyx b/python/cuvs/cuvs/neighbors/nn_descent/nn_descent.pyx index 70ca0853a..9dd14c27e 100644 --- a/python/cuvs/cuvs/neighbors/nn_descent/nn_descent.pyx +++ b/python/cuvs/cuvs/neighbors/nn_descent/nn_descent.pyx @@ -70,8 +70,6 @@ cdef class IndexParams: More iterations produce a better quality graph at cost of performance termination_threshold : float The delta at which nn-descent will terminate its iterations - return_distances : bool - Whether or not to include distances in the output. """ cdef cuvsNNDescentIndexParams* params @@ -90,7 +88,6 @@ cdef class IndexParams: intermediate_graph_degree=None, max_iterations=None, termination_threshold=None, - return_distances=None, n_clusters=None ): if metric is not None: @@ -103,11 +100,14 @@ cdef class IndexParams: self.params.max_iterations = max_iterations if termination_threshold is not None: self.params.termination_threshold = termination_threshold - if return_distances is not None: - self.params.return_distances = return_distances if n_clusters is not None: self.params.n_clusters = n_clusters + # setting this parameter to true will cause an exception in the c++ + # api (`Using return_distances set to true requires distance view to + # be allocated.`) - so instead force to be false here + self.params.return_distances = False + @property def metric(self): return DISTANCE_NAMES[self.params.metric] @@ -132,10 +132,6 @@ cdef class IndexParams: def termination_threshold(self): return self.params.termination_threshold - @property - def return_distances(self): - return self.params.return_distances - @property def n_clusters(self): return self.params.n_clusters