File tree Expand file tree Collapse file tree 4 files changed +31
-9
lines changed
src/rapids_singlecell/preprocessing/_neighbors/_algorithms Expand file tree Collapse file tree 4 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 1+ ### 0.13.5 {small}` the-future `
2+
3+ ``` {rubric} Features
4+ ```
5+
6+ ``` {rubric} Performance
7+ ```
8+ * Improves ` pp.neighbors ` performance with ` all_neighbors ` and ` nn_descent ` when a Dask cluster is active {pr}` 499 ` {smaller}` S Dicks `
9+
10+
11+ ``` {rubric} Bug fixes
12+ ```
13+
14+
15+ ``` {rubric} Misc
16+ ```
Original file line number Diff line number Diff line change 33# Release notes
44
55## Version 0.13.0
6+ ``` {include} /release-notes/0.13.5.md
7+ ```
68``` {include} /release-notes/0.13.4.md
79```
810``` {include} /release-notes/0.13.3.md
Original file line number Diff line number Diff line change 77
88from rapids_singlecell .preprocessing ._neighbors ._helper import _compute_nlist
99
10+ try :
11+ from cuvs .neighbors import all_neighbors
12+ except ImportError :
13+ all_neighbors = None
1014if TYPE_CHECKING :
1115 from collections .abc import Mapping
1216
@@ -22,9 +26,7 @@ def _all_neighbors_knn(
2226 metric_kwds : Mapping ,
2327 algorithm_kwds : Mapping ,
2428) -> tuple [cp .ndarray , cp .ndarray ]:
25- try :
26- from cuvs .neighbors import all_neighbors
27- except ImportError :
29+ if all_neighbors is None :
2830 raise ImportError (
2931 "The 'all_neighbors' algorithm is only available in cuvs >= 25.10. "
3032 "Please update your cuvs installation."
Original file line number Diff line number Diff line change 33from typing import TYPE_CHECKING
44
55import cupy as cp
6- from packaging .version import parse as parse_version
76
87if TYPE_CHECKING :
98 from collections .abc import Mapping
109
1110 from rapids_singlecell .preprocessing ._neighbors import _Metrics
1211
1312
13+ try :
14+ from cuvs .neighbors import nn_descent
15+ except ImportError :
16+ nn_descent = None
17+
18+
1419def _nn_descent_knn (
1520 X : cp .ndarray ,
1621 Y : cp .ndarray ,
@@ -20,14 +25,11 @@ def _nn_descent_knn(
2025 metric_kwds : Mapping ,
2126 algorithm_kwds : Mapping ,
2227) -> tuple [cp .ndarray , cp .ndarray ]:
23- from cuvs import __version__ as cuvs_version
24-
25- if parse_version (cuvs_version ) <= parse_version ("24.12" ):
26- raise ValueError (
28+ if nn_descent is None :
29+ raise ImportError (
2730 "The 'nn_descent' algorithm is only available in cuvs >= 25.02. "
2831 "Please update your cuvs installation."
2932 )
30- from cuvs .neighbors import nn_descent
3133
3234 # Extract intermediate_graph_degree from algorithm_kwds, with default
3335 intermediate_graph_degree = algorithm_kwds .get ("intermediate_graph_degree" , None )
You can’t perform that action at this time.
0 commit comments