-
Notifications
You must be signed in to change notification settings - Fork 152
Added store_many_vectors on Mongo Storage #87
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
Conversation
@amorgun
amorgun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some tests for store_many_vectors to the mongo test suite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring belongs to store_vector method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using from future.builtins import zip because it is more efficient in python2.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the code, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the code, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this because I got some deprecation warnings
nearpy/storage/storage_mongo.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove method is deprecated so I replaced it with the suggested delete_many. It avoids annoying deprecation warnings
@etudor
etudor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amorgun I added tests for the store_many_vectors method
amorgun
commented
Nov 21, 2019
@etudor The test is broken because it cannot import InsertOne. You should add pymongo to test requirements.
etudor
commented
Nov 29, 2019
@amorgun I have updated this
amorgun
commented
Nov 29, 2019
@etudor It looks like a lot of mongo tests are broken now in python2.7. Please, check if it is related to your changes. Maybe you should pin an older version of pymongo.
Uh oh!
There was an error while loading. Please reload this page.
Because I found this method to be very useful on Redis storage, I've added it to the mongo storage as well.
I haven't done a benchmark to compare what is the speed increase vs single inserts.