Closed pritam-dey3 closed 2 months ago
Hmm, this seems not to happen in the following:
import faiss
from faiss.swigfaiss_avx2 import Index
import numpy as np
index = faiss.index_factory(16, "IDMap,Flat")
emb = np.random.uniform(0, 1, (8, 16)).astype(np.float32)
index.train(emb)
This indicates something is wrong when the optimization flag is not set
Btw, it is possible to import Index
in the following way:
import faiss
from faiss import Index
Btw, it is possible to import
Index
in the following way:import faiss from faiss import Index
This solves my problem. Thanks
Describe the bug I was trying to import faiss.swigfaiss.Index to static type index in my code. But it took me quite some painful hours to figure out the issue.
To Reproduce The following code works.
however, the following code fails
In conda installation, both the above code works fine.
Desktop (please complete the following information):