Closed czpmango closed 1 month ago
I got the error DirectMap.cpp:82: direct map not initialized when reconstruct() from an IVF index.
DirectMap.cpp:82: direct map not initialized
reconstruct()
import faiss quantizer = faiss.IndexFlatL2(dim) index = faiss.IndexIVFFlat(quantizer, dim, nb) index.train(train_vectors) index.add_with_ids(db_vectors, idx) index.make_direct_map(False) # use nomap type item0 = index.reconstruct(0) print("Reconstructed item 0: ", item0)
Is there any solution for this scenario?
Can you help me understand why setting make_direct_map to True will not work for your usecase?
I got the error
DirectMap.cpp:82: direct map not initialized
whenreconstruct()
from an IVF index.Is there any solution for this scenario?