Skip to content

Commit 2773c48

Browse files
committed
skip tests
1 parent 50ff5d9 commit 2773c48

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/rapids_singlecell/preprocessing/_neighbors/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ def neighbors(
157157
158158
* 'nn_descent': Uses the NN-descent algorithm to approximate the k-nearest neighbors.
159159
160+
* 'all_neighbors': Uses the all-neighbors algorithm to approximate the k-nearest neighbors.
161+
162+
* 'mg_ivfflat': Uses the Multi-GPU inverted file indexing to partition the dataset into coarse quantizer cells and performs the search within the relevant cells.
163+
164+
* 'mg_ivfpq': Combines Multi-GPU inverted file indexing with product quantization to encode sub-vectors of the dataset, facilitating faster distance computation.
165+
160166
Please ensure that the chosen algorithm is compatible with your dataset and the specific requirements of your search problem.
161167
metric
162168
A known metric's name or a callable that returns a distance.
@@ -171,6 +177,16 @@ def neighbors(
171177
For 'nn_descent' algorithm, the following parameters can be specified:
172178
* 'intermediate_graph_degree': The degree of the intermediate graph. Default is None.
173179
It is recommended to set it to `>= 1.5 * n_neighbors`.
180+
For 'all_neighbors' algorithm, the following parameters can be specified:
181+
* 'algo': The algorithm to use. Valid options are: 'ivf_pq' and 'nn_descent'. Default is 'nn_descent'.
182+
* 'n_lists': Number of inverted lists for IVF indexing. Default is 2 * next_power_of_2(sqrt(n_samples)).
183+
* 'n_probes': Number of lists to probe during search. Default is 20. Higher values
184+
increase accuracy but reduce speed.
185+
For 'mg_ivfflat' and 'mg_ivfpq' algorithms, the following parameters can be specified:
186+
* 'distribution_mode': The distribution mode to use. Valid options are: 'replicated' and 'distributed'. Default is 'replicated'.
187+
* 'n_lists': Number of inverted lists for IVF indexing. Default is 2 * next_power_of_2(sqrt(n_samples)).
188+
* 'n_probes': Number of lists to probe during search. Default is 20. Higher values
189+
increase accuracy but reduce speed.
174190
175191
key_added
176192
If not specified, the neighbors data is stored in .uns['neighbors'],

tests/test_mg_neighbors.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import itertools
44

5+
import cuvs
56
import numpy as np
67
import pytest
8+
from packaging.version import parse as parse_version
79
from scanpy.datasets import pbmc68k_reduced
810

911
import rapids_singlecell as rsc
@@ -29,6 +31,9 @@ def _calc_recall(distances, reference_distances, tolerance=0.9):
2931

3032
@pytest.mark.parametrize("algo", ["mg_ivfflat", "mg_ivfpq"])
3133
def test_mg_neighbors(algo):
34+
if parse_version(cuvs.__version__) <= parse_version("25.08"):
35+
pytest.skip("Skipping Multi-GPU neighbors")
36+
3237
if algo == "mg_ivfflat":
3338
other_algo = "ivfflat"
3439
else:
@@ -49,6 +54,8 @@ def test_mg_neighbors(algo):
4954

5055
@pytest.mark.parametrize("algo", ["nn_descent", "ivfpq"])
5156
def test_all_neighbors(algo):
57+
if parse_version(cuvs.__version__) <= parse_version("25.08"):
58+
pytest.skip("Skipping All-Neighbors")
5259
adata = pbmc68k_reduced()
5360
n_rows = adata.shape[0]
5461
if algo == "ivfpq":

0 commit comments

Comments
 (0)