Closed lambda7xx closed 2 months ago
my faiss-cpu version is 1.8. my code is below
index.search_preassigned(emb.shape[0], emb, nnn, candidate_cluster, None, topk_distance, topk_indices)
I try to use the search_preassigned
API for ivfflat. I want to search the top-nnn vector in the candidate cluster and set the centroid_dis
as None(https://faiss.ai/cpp_api/struct/structfaiss_1_1IndexIVFFlat.html). Base on the document(https://faiss.ai/cpp_api/struct/structfaiss_1_1IndexIVFFlat.html), it has the search_preassigned
.
but my error is
TypeError: handle_Index.<locals>.replacement_search_preassigned() takes 5 positional arguments but 8 were given
type(self.index):<class 'faiss.swigfaiss_avx2.IndexIVFFlat'>
Summary
Platform
OS:
Faiss version:
Installed from:
Faiss compilation options:
Running on:
Interface:
Reproduction instructions