Skip to content
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

Add python and rust bindings for Ivf-Pq #90

Merged
merged 8 commits into from
Apr 30, 2024

Conversation

benfred
Copy link
Member

@benfred benfred commented Apr 19, 2024

No description provided.

@benfred benfred added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Apr 19, 2024
@benfred benfred requested review from a team as code owners April 19, 2024 21:40
@benfred benfred marked this pull request as draft April 19, 2024 21:40
@benfred benfred marked this pull request as ready for review April 22, 2024 18:22
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

LGTM, though there's a couple user quality of life improvements I think we should capture in Github issues and follow-up with soon

>>> distances, neighbors = ivf_pq.search(ivf_pq.SearchParams(),
... index, dataset,
... k)
>>> distances = cp.asarray(distances)
Copy link
Member

Choose a reason for hiding this comment

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

I think we can clean this up now too and maybe follow the semantics that have been successful in cuml- if a numpy array is passed in, a numpy array should be returned, etc...

cuml abstracts these conversations behind a "CumlArray" object. I suspect we should consider doing something similar for cuVS.


Parameters
----------
search_params : SearchParams
Copy link
Member

Choose a reason for hiding this comment

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

Does this automatically to the ivf_pq.SearchParas in the docs? If not, we might want to fully-qualify these

Copy link
Member Author

Choose a reason for hiding this comment

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

good point about the docs! We were missing the RST files for ivf-pq and bfknn, so it didn't show up at all =( - I've added those in.

For linking to the SearchParams struct - I had to update to :py:class:cuvs.neighbors.ivf_pq.SearchParams (like both add the fully qualified class name, and the py:class marker to create the hyper link) - but with that change we get a clickable link in the sphinx docs

@benfred benfred requested a review from a team as a code owner April 29, 2024 23:25
@benfred
Copy link
Member Author

benfred commented Apr 30, 2024

/merge

@rapids-bot rapids-bot bot merged commit 82de6ef into rapidsai:branch-24.06 Apr 30, 2024
54 checks passed
@benfred benfred deleted the ivf_pq_rust_python branch April 30, 2024 20:51
difyrrwrzd added a commit to difyrrwrzd/cuvs that referenced this pull request Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake cpp improvement Improves an existing functionality non-breaking Introduces a non-breaking change Python
Projects
Development

Successfully merging this pull request may close these issues.

2 participants