-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Add Spann configuration to collection config #4195
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
d11a67e
to
5c574e5
Compare
5c574e5
to
f88fac6
Compare
f88fac6
to
43f2b03
Compare
59b49f0
to
f06fbcd
Compare
f06fbcd
to
90c58e8
Compare
43f2b03
to
22e2c30
Compare
40c2d38
to
bdf549e
Compare
50adc5c
to
09e3dc4
Compare
09e3dc4
to
6a77ccf
Compare
@@ -432,6 +440,13 @@ impl ServiceBasedFrontend { | |||
.. | |||
}: UpdateCollectionRequest, | |||
) -> Result<UpdateCollectionResponse, UpdateCollectionError> { | |||
// Check if spann is requested with a local executor | |||
if let (Some(config), Executor::Local(_)) = (new_configuration.as_ref(), &self.executor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix this and use get_segment_types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make new PR with grpc (go) for update collection with spann
rust/frontend/src/server.rs
Outdated
.contains(&SegmentType::Spann) | ||
{ | ||
return Err(ValidationError::SpannNotImplemented)?; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add checks for hnsw in both config and default_knn_index to make sure it's supported segment type
space: Space | ||
ef_construction: int | ||
ef_search: int | ||
max_neighbors: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly m
was more readable since it is a standard hnsw param. So I would use a name such as hnsw_m
for this and for the other two hnsw_ef_construction
and hnsw_ef_search
36df249
to
3910f37
Compare
74db38f
to
04a5ca9
Compare
9fab455
to
c556000
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nit: should you have client side validations?
ef_config = None | ||
|
||
# Process vector index configuration (HNSW or SPANN) | ||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is duplicate of above check
@@ -119,6 +122,7 @@ impl Bindings { | |||
collections_with_segments_provider: collection_cache_config, | |||
log: log_config, | |||
executor: executor_config, | |||
default_knn_index: knn_index, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: directly inline KnnIndex::Hnsw here?
df7be10
to
193d84f
Compare
04a5ca9
to
56ff6e9
Compare
193d84f
to
49be9af
Compare
49be9af
to
66deab4
Compare
3fe5815
to
52655c8
Compare
66deab4
to
960642f
Compare
Description of changes
Add SPANN configuration for collection config. It also adds a new attribute default knn index to allow setting the default index when no configuration is set, and tests that the segment executor has access to the requested index type.
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?