-
Notifications
You must be signed in to change notification settings - Fork 655
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
Threaded add_items issue #28
Comments
Hi @sumsuddin, |
I can't share the private data that I was working on. But here is a randomly generated
For this specific random number combination (attached file) I get following two different recall accuracy randomly in different run.
Increasing the item size makes the issue more obvious in my experiments. I guess you can find easier ways to regenerate the issue. Python version : Python 2.7.6 |
I see. Thanks!
There is a potential fix that can stabilize the randomness to some extent - setting the element levels before the actual insertion (it would require updating bindings), but it will not solve the problem completely. |
…level, this should make the index a lot more stable see : nmslib/hnswlib#28
I was looking into the python example. In my experience, the threaded add_items gives me different result & accuracy every time I run the script.
I think using multiple threads while adding the items is wrong here.
p.set_num_threads(4) # by default using all available cores
Moreover when I used cosine spcae the accuracy was around 50% in some index generation.
Index(space='cosine', dim=dim)
When I used single thread the results were consistant all the time.
p.set_num_threads(1)
Can someone clarify the issue?
The text was updated successfully, but these errors were encountered: