Skip to content

UMAP knn build with cuVS all-neighbors #6563

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

Draft
wants to merge 23 commits into
base: branch-25.06
Choose a base branch
from

Conversation

jinsolp
Copy link
Contributor

@jinsolp jinsolp commented Apr 21, 2025

Description

Replacing usage of raft NN Descent to cuVS all-neighbors wrapper (which internally uses NN Descent and includes the batching feature). Planning to add some interesting numbers to this PR...

Usage

from cuml.manifold.umap import UMAP as cuUMAP

cuml_model = cuUMAP(
        n_neighbors=10,
        build_algo="nn_descent",
        build_kwds={"n_clusters": 4, "n_nearest_clusters": 2, "nn_descent": {"graph_degree": 15, "max_iterations": 20}},
    )

embedding = cuml_model.fit_transform(data, data_on_host=True)

cuml_model = cuUMAP(
        n_neighbors=10,
        build_algo="ivfpq",
        build_kwds={"n_clusters": 4, "n_nearest_clusters": 2},
    )
embedding = cuml_model.fit_transform(data, data_on_host=True)

@jinsolp jinsolp requested review from a team as code owners April 21, 2025 21:25
Copy link

copy-pr-bot bot commented Apr 21, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Cython / Python Cython or Python issue label Apr 21, 2025
@@ -48,8 +48,8 @@ function(find_and_configure_cuvs)
BUILD_EXPORT_SET cuml-exports
INSTALL_EXPORT_SET cuml-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/${PKG_FORK}/cuvs.git
GIT_TAG ${PKG_PINNED_TAG}
GIT_REPOSITORY https://github.com/jinsolp/cuvs.git
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be reverted once this PR in cuvs is merged

@jinsolp jinsolp marked this pull request as draft April 21, 2025 22:17
@jinsolp jinsolp added feature request New feature or request breaking Breaking change labels Apr 25, 2025
@jinsolp
Copy link
Contributor Author

jinsolp commented Apr 25, 2025

/ok to test

@csadorf csadorf linked an issue Apr 28, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change CMake CUDA/C++ Cython / Python Cython or Python issue feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to using cuVS for nn-descent
1 participant