feat!: Updated KNN index creation interface to support skipping some of source vectors#103
Merged
Conversation
…of source vectors
Linux debug test results 8 files 8 suites 11m 24s ⏱️ Results for commit b56e3d0. |
Linux release test results 8 files 8 suites 5m 59s ⏱️ Results for commit b56e3d0. |
Windows test results 5 files 5 suites 16m 3s ⏱️ Results for commit b56e3d0. |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the KNN index creation API to allow skipping source vectors by passing explicit row IDs.
- Bumps
LIB_VERSIONto 8 - Extends
Builder_i::TrainandBuilder_i::SetAttrto accept auRowIDparameter - Modifies
HNSWIndexBuilder_cto use caller-provided row IDs and replaces its internal counter with a first-doc flag
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| knn/knn.h | Bumped library version and added uRowID parameter to Builder_i |
| knn/knn.cpp | Updated HNSW internal builder to accept uRowID, removed counter |
Comments suppressed due to low confidence (2)
knn/knn.h:102
- [nitpick] The newly added
uRowIDparameter onTrainandSetAttrshould be documented in the header (e.g. a brief doc comment) to explain its role when skipping vectors.
virtual void Train ( int iAttr, uint32_t uRowID, const util::Span_T<float> & dData ) = 0;
knn/knn.cpp:394
- [nitpick] There are no tests covering the new behavior where
uRowIDmay be non-sequential or skipped; consider adding unit tests to verify correct indexing when callers supply custom row IDs.
m_pAlg->addPoint ( (void*)m_dQuantized.data(), (size_t)uRowID );
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat!: Updated KNN index creation interface to support skipping some of source vectors