hnswlib icon indicating copy to clipboard operation
hnswlib copied to clipboard

Loaded index query error

Open ClaudeHu opened this issue 1 year ago • 0 comments

I installed latest version of hnswlib (0.8.0) and had two hnswlib.Index loaded from .bin files. They both contain same number of vectors (9138), and have same values of ef (10) and M (16). However, when run knn_query() with k=9138, one index work while the other one gave this error even after reset ef to 9138:

RuntimeError: Cannot return the results in a contiguous 2D array. Probably ef or M is too small

ClaudeHu avatar Apr 11 '24 18:04 ClaudeHu