Open ololo123321 opened 2 years ago
code_size == 2 ** 64 - 1
(or code_size == (unsigned long)(-1)
) means that the code size is invalid for the inverted index. That's because IndexIVFPQFastScan
uses BlockInvertedLists
(in IndexIVFFastScan::init_fastscan()
) where code_size
is invalid (in a comment in faiss::InvertedLists
). So I guess merge_from
can't be used for the indices that uses fast scan.
Thanks for reply!
Yes, have found this comment, and now it's clear for me why there is such a value of code_size
.
Interesting, that if add row ivf.code_size = index_ivf.code_size
before this one, the index will be created and search will work, but search results would be random.
to clarify: TODO is implement merge (and remove, while we are at it) for fast_scan indexes.
Summary
Hello! I noticed strange things with
code_size
ofIndexIVFPQFastScan
:The 3rd and 4th asserts are surprising for me. The problem is that the inequality is the reason of the following error in function
faiss.contrib.ondisk.merge_ondisk
:Platform
OS: macOS 12.4, ubuntu 20.04
Faiss version: 1.7.1, 1.7.2
Installed from: conda, pip
Running on:
Interface:
Reproduction instructions