Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metric typs is missing in faiss factory #4

Open
simshi opened this issue Jun 26, 2024 · 0 comments
Open

metric typs is missing in faiss factory #4

simshi opened this issue Jun 26, 2024 · 0 comments

Comments

@simshi
Copy link

simshi commented Jun 26, 2024

elif index_string == "ivfsq":
quantizer = faiss.IndexFlat(self.dimension, faiss_metric)
nlist = self.kwargs.get("nlist", 128)
index = faiss.IndexIVFScalarQuantizer(
quantizer,
self.dimension,
nlist,
faiss.ScalarQuantizer.QT_8bit,
)

faiss_metric is passed to quantizer but not the actual Index:

            index = faiss.IndexIVFScalarQuantizer(
                quantizer,
                self.dimension,
                nlist,
                faiss.ScalarQuantizer.QT_8bit,
                faiss_metric, # missing here
            )

same in ivfpq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant