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

[Bug]: Faiss Search Error with TextEmbedding #308

Open
thlurte opened this issue Jul 22, 2024 · 1 comment
Open

[Bug]: Faiss Search Error with TextEmbedding #308

thlurte opened this issue Jul 22, 2024 · 1 comment

Comments

@thlurte
Copy link

thlurte commented Jul 22, 2024

What happened?

I'm encountering a ValueError when attempting to perform similarity search with Faiss using embeddings generated by FastEmbed's TextEmbedding.embed method.

What Python version are you on? e.g. python --version

Python - 3.10.12
fastembed - 0.3.4
faiss - 1.8.0

Version

0.2.7 (Latest)

What os are you seeing the problem on?

Linux

Relevant stack traces and/or logs

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-40-6bb0fc687deb> in <cell line: 2>()
      1 import numpy
----> 2 index.search(a,1)

/usr/local/lib/python3.10/dist-packages/faiss/class_wrappers.py in replacement_search(self, x, k, params, D, I)
    325         """
    326 
--> 327         n, d = x.shape
    328         x = np.ascontiguousarray(x, dtype='float32')
    329         assert d == self.d

ValueError: not enough values to unpack (expected 2, got 1)
@generall
Copy link
Member

usually we recommend to use proper vector database

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

2 participants