-
Notifications
You must be signed in to change notification settings - Fork 126
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
Bump faiss lib commit to 32f0e8cf92cd2275b60364517bb1cce67aa29a55 #1443
Conversation
b14f238
to
7a77532
Compare
@heemin32 Can we hold this PR from merging into main branch and 2.x until 2.12 code freeze ? |
7a77532
to
6069b90
Compare
We can. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1443 +/- ##
============================================
+ Coverage 85.02% 85.05% +0.03%
Complexity 1277 1277
============================================
Files 167 167
Lines 5207 5207
Branches 493 493
============================================
+ Hits 4427 4429 +2
+ Misses 572 570 -2
Partials 208 208 ☔ View full report in Codecov by Sentry. |
std::unique_ptr<faiss::IDGrouperBitmap> buildIDGrouperBitmap(knn_jni::JNIUtilInterface * jniUtil, JNIEnv *env, jintArray parentIdsJ, std::vector<uint64_t>* bitmap) { | ||
int *parentIdsArray = jniUtil->GetIntArrayElements(env, parentIdsJ, nullptr); | ||
int parentIdsLength = jniUtil->GetJavaIntArrayLength(env, parentIdsJ); | ||
auto* parent_id_filter = new FixedBitSet(parentIdsArray, parentIdsLength); |
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.
we should pass parentIdsArray and parentIdsLength directly to this function rather than pass JNIUtilInterface, JNIEnv, parentIdsJ
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.
faiss_wrapper
already has methods which uses JNI objects. Therefore, I moved the core logic into a new file faiss_util
which will contain only methods agnostic to JNI.
e3bca97
to
896b58a
Compare
2794e0c
to
a4f22e1
Compare
da6f77d
to
1b09e12
Compare
Signed-off-by: Heemin Kim <[email protected]>
1b09e12
to
c674058
Compare
Signed-off-by: Heemin Kim <[email protected]> (cherry picked from commit ced1ff2)
Signed-off-by: Heemin Kim <[email protected]> (cherry picked from commit ced1ff2) Co-authored-by: Heemin Kim <[email protected]>
Description
In #1398, we introduced a custom patch on faiss library to support multi-vector feature. After that, faiss refactored HNSW by generalizing ResultHandler which caused a conflict with the previous custom patch and blocking us from updating faiss library beyond commit# 32f0e8cf92cd2275b60364517bb1cce67aa29a55.
This PR is to resolve the conflict and keep the supporting of multi-vector feature as it is on top of faiss's commit number 32f0e8cf92cd2275b60364517bb1cce67aa29a55 so that we are unblocked for future faiss library update.
Patch file is from facebookresearch/faiss#3227
Issues Resolved
#1409
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.