-
Notifications
You must be signed in to change notification settings - Fork 11
Create Dataclasses and Builder for GPU Index Build Config #16
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
Create Dataclasses and Builder for GPU Index Build Config #16
Conversation
Still a WIP def create_index_config(**kwargs) -> GPUIndexBuildConfig: print(create_index_config(metric='cosinesimil', gpu_config={'graph_build_algo': 'NN_DECENT', 'ivf_pq_build_params': {'n_lists': 1040}})) |
9e19e26
to
8443641
Compare
remote_vector_index_builder/core/common/models/index_builder/__init__.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/index_builder/index_config_builder.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/common/models/index_builder/ivf_pq_build_cagra_config.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/index_builder/index_config_builder.py
Outdated
Show resolved
Hide resolved
fffcd66
to
66aa62a
Compare
remote_vector_index_builder/core/common/models/index_builder/gpu_index_build_config.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/index_builder/faiss_index_builder.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/common/models/index_builder/gpu_index_cagra_config.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/index_builder/models/create_gpu_index_response.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/index_builder/faiss_index_builder.py
Outdated
Show resolved
Hide resolved
remote_vector_index_builder/core/index_builder/faiss_index_config_builder.py
Outdated
Show resolved
Hide resolved
@Rajrahane For general feedback - I feel that the |
30eadd3
to
3d7ccbc
Compare
I've tried consolidating creation of the GPUIndexBuildConfig to a simpler one function, rather than the elaborate index_config_builder and index_config_director as suggest by Rohan The issue is that it was Difficult to parse a complex multilevel dict with Because the dict sent is complex with missing fields it threw a lot of NULL issues, And i used the builder pattern in a different filejust to make it more structured, else the single function would be very large. Also had to maintain the single responsibility of the main function build_gpu_index of the FaissIndexBuilder.py file to only call all the steps ->
|
Also the problem to solve in a gist before feeding it to the _create_gpu_index and _create_and_write_cpu_index_to_file helper methods |
a143bfd
to
9a2cb6b
Compare
Signed-off-by: Rajvaibhav Rahane <[email protected]>
9a2cb6b
to
6332a28
Compare
b98d948
to
ae5d420
Compare
Signed-off-by: Rajvaibhav Rahane <[email protected]>
ae5d420
to
6debbbd
Compare
Signed-off-by: Rajvaibhav Rahane <[email protected]>
be49b95
to
b21d1e0
Compare
remote_vector_index_builder/core/common/models/index_builder/faiss/faiss_gpu_index_type
Outdated
Show resolved
Hide resolved
Signed-off-by: Rajvaibhav Rahane <[email protected]>
remote_vector_index_builder/core/common/models/index_builder/faiss/faiss_gpu_index_type
Outdated
Show resolved
Hide resolved
1a171d4
to
32ac8aa
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.
Thanks @Rajrahane , this PR mostly LGTM, just a few spots of discussion/nits
...vector_index_builder/core/common/models/index_builder/faiss/faiss_gpu_index_cagra_builder.py
Show resolved
Hide resolved
remote_vector_index_builder/core/common/models/index_builder/faiss/faiss_gpu_index_type.py
Outdated
Show resolved
Hide resolved
...ector_index_builder/core/common/models/index_builder/faiss/faiss_index_hnsw_cagra_builder.py
Show resolved
Hide resolved
Signed-off-by: Rajvaibhav Rahane <[email protected]>
32ac8aa
to
8e66eda
Compare
Description
Implements
Issues Resolved
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.