-
Notifications
You must be signed in to change notification settings - Fork 35
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
panicked at 'too large index value provided to Idx::new' #57
Comments
For what it's worth, this behavior is documented.
One would use What one can do to improve this is:
|
My mistake I missed that
I'm new to faiss so I could be misunderstanding something. Is it the case that faiss requires Idx to be non-negative? My use case is I'm adding vectors with |
Just catching up with older issues.
That much is the assumption made in this API, but it does not go far off from what is expected to users of the native Faiss API. An index entry ID of
As explained above, this concept of empty ID is indeed in the native library. Even if this API were to be more relaxed to allow negative numbers, it should not allow an ID value of All of this can be circumvented by converting an
It would be an interesting design option, but without an integer type that is not allowed to be |
I missed this; this would complicate things |
When you use a large integer (greater than 2^63) as an ID, faiss-rs will panic. This is a bit unexpected as it's not mentioned anywhere in the documentation, nor do I think faiss has this limitation. If the intent is to represent null ids, isn't
Option<faiss::idx_t>
a better choice?The text was updated successfully, but these errors were encountered: