-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
segfault 11 when using non sequential IDs #288
Comments
weird, i can take a look |
honestly the support for missing vectors is a bit flaky |
I just tried running your code and it seems to work well (does not segfault) did you use the latest version? i've fixed a number of issues related to index "holes" |
The latest master also doesn't return 0 as one of the neighbors although I don't think that's on pypi yet. Can you please check if latest version of pypi or latest master still exhibits the issue you saw? |
woah, that's absolutely awesome! just tested on the latest master and it does not, indeed, cause either segfault nor the incorrect index value return. apologies for not testing it on the latest code..! thank you x 1000000! ok to close this I guess? |
err, even the latest version on pypi does not have these issues. I should have definitely upgraded before filing this...! thanks again. definitely closing. :-) for the record, I was running annoy==1.11.4, which I just re-tested and does segfault/return 0. |
sweet, thanks for confirming. i might push the 0 fix to pypi and bump the version to 1.11.6 |
I just came upon a reproducible segfault that seems to be related to non-sequential IDs.
I am working with 10-dimensional vectors and for this small reproducible example, 200 items. When inserting non sequential IDs, if I attempt to
get_nns_by_vector
with an
value of 100, I get a segfault. Calling it with an
of 10 does work. The specific vector that's passed toget_nns_by_vector
also makes a difference (see comments in code below)Please get the values from this gist.
As a semi-related, but different issue, if I switch the metric to
manhattan
(which I should probably use in this case), one of the returned result indices is0
, which was not part of the original indices.switch
and
in the code above to see the issue
The text was updated successfully, but these errors were encountered: