Skip to content

LazyIndex #350

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

Merged
merged 4 commits into from
Dec 9, 2021
Merged

LazyIndex #350

merged 4 commits into from
Dec 9, 2021

Conversation

urigoren
Copy link

Added a LazyIndex class with the same API as Index.
Useful when having multiple indices with lazy initialization.

This also fixes the super annoying bug that crashes hnswlib (without an exception) if calling add_items or get_max_elements before calling init_index.

This PR in its first version probably needs some work, I'd love to hear your feedback, thanks :-)

Added `LazyIndex` with the same API as `Index`.
Useful when having multiple indices with lazy initialization.
@yurymalkov
Copy link
Member

Hi @urigoren ,
Thanks!

One thing I would change is the name of the file, since it directly collides with hnswlib name, which might cause ambiguity if imported within the folder.
Another thing is - adding a short description in the file will be helpful for others to understand its purpose.

@urigoren
Copy link
Author

Hi, @yurymalkov - done.
Could you please review ?

Thanks!

@yurymalkov yurymalkov merged commit 07c68cc into nmslib:develop Dec 9, 2021
@yurymalkov
Copy link
Member

Looks good to me. Thanks!

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.

2 participants