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

Error when importing FAISSDocumentStore #3600

Closed
1 task done
MuatazMohammed opened this issue Nov 17, 2022 · 5 comments
Closed
1 task done

Error when importing FAISSDocumentStore #3600

MuatazMohammed opened this issue Nov 17, 2022 · 5 comments

Comments

@MuatazMohammed
Copy link

MuatazMohammed commented Nov 17, 2022

Describe the bug
from haystack.document_stores import FAISSDocumentStore

Error message
AttributeError: module 'faiss' has no attribute 'swigfaiss'

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.

To Reproduce
Steps to reproduce the behavior

FAQ Check

System:

  • OS: Colab
  • GPU/CPU: GPU
  • Haystack version (commit or version number): latest version
  • DocumentStore: FAISSDocumentStore
  • Reader:
  • Retriever:
@anakin87
Copy link
Member

Same error of #3561 (comment).

@mgoin
Copy link

mgoin commented Nov 17, 2022

@anakin87 I also started seeing this error in our CI for deepsparse. Specifically it seems faiss-cpu==1.7.3 causes this issue. If I manually downgrade to faiss-cpu==1.7.2 there is no issue.

@MuatazMohammed
Copy link
Author

MuatazMohammed commented Nov 19, 2022

it was solved automatically without any modifications, don't know how :D ?

@OMGAmici
Copy link

OMGAmici commented Nov 20, 2022

Hey everyone, I am having the same issue now. For me, I tried installing and reinstalling haystack, but it is persistent. Specifically, it appears whenever I try to import certain (but not all) packages. For example, from haystack.nodes import PreProcessor causes the error.

Besides downgrading to faiss-cpu==1.7.2, is there any other or better solution I should follow?

@maxjeblick
Copy link

I resolved this issue by uninstalling faiss-cpu, only keeping faiss-gpu.
Both versions got installed when running pip install -e '.[all-gpu]'

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

5 participants