You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am implementing the HNSW index on a dummy dataset. I want to know how many exact distance computations are performed during the search. To do so, I use faiss.cvar.hnsw_stats.ndis; however, it always returns 0. Could you tell me how to fix the issue?
Code:
x = np.random.randn(10000,128)
M=32
index_hnsw = faiss.IndexHNSWFlat(128, M)
index_hnsw.hnsw.efConstruction = 40
index_hnsw.hnsw.efSearch = 16
index_hnsw.add(x)
D, I = index_hnsw.search(x[:10], 2)
cands = faiss.cvar.hnsw_stats.ndis #total cands evaluated across all queries
The text was updated successfully, but these errors were encountered:
This was fixed by @mdouze in #3309 (thank you Matthijs for flagging!). @anupsingh15 you need use the nightly package (see INSTALL.md) so this fix is included in the version of faiss you have in your conda environment, for your reference:
Hello,
I am implementing the HNSW index on a dummy dataset. I want to know how many exact distance computations are performed during the search. To do so, I use
faiss.cvar.hnsw_stats.ndis
; however, it always returns 0. Could you tell me how to fix the issue?Code:
The text was updated successfully, but these errors were encountered: