-
Notifications
You must be signed in to change notification settings - Fork 12
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
pybind: replaced input type to bytearray - MOD-4597 #304
Conversation
added test for fp32, fp64 and L2, cosine
Codecov ReportBase: 96.58% // Head: 96.58% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
=======================================
Coverage 96.58% 96.58%
=======================================
Files 61 61
Lines 3482 3482
=======================================
Hits 3363 3363
Misses 119 119 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…to pybind_get_input_as_bytearray
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.
Very nice and clean!
I noticed you added an empty file (__init__.py
) and few more comments
src/python_bindings/bindings.cpp
Outdated
@@ -69,24 +69,33 @@ class PyBatchIterator { | |||
void reset() { VecSimBatchIterator_Reset(batchIterator.get()); } | |||
virtual ~PyBatchIterator() {} | |||
}; | |||
#include <pybind11/embed.h> |
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.
move include up the file?
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.
forgot to remove it
* replaced input type to bytearray * added a module to convert numpy to bytearay * moved mybytearray to python bindings lib
* replaced input type to bytearray * added a module to convert numpy to bytearay * moved mybytearray to python bindings lib
Describe the changes in the pull request
The index function in bindings.cpp convert the py::object into a pointer directly instead of into an array
Which issues this PR fixes
Main objects this PR modified
1.bindings.cpp
2. test_hnswlib.py
3. test_bruteforce.py
4. bm_datasets.py
Mark if applicable