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

Create Dataclasses and Builder for GPU Index Build Config #16

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Rajrahane
Copy link
Member

Description

Implements classes for the GPU Index Config passed to the build gpu index function
Implements a Builder and Director class for a user to initialize the config with partial params.

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.

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>
Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>
Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>
Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>
@Rajrahane
Copy link
Member Author

Still a WIP
Here's how you can initialize the config-

def create_index_config(**kwargs) -> GPUIndexBuildConfig:
builder = IndexConfigBuilder()
director = IndexConfigDirector(builder)
return director.construct_config(kwargs)

print(create_index_config(metric='cosinesimil', gpu_config={'graph_build_algo': 'NN_DECENT', 'ivf_pq_build_params': {'n_lists': 1040}}))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant