-
Notifications
You must be signed in to change notification settings - Fork 661
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
Embeddings.search leads to segfault error #813
Comments
Hello, thank you for the detailed report. This is typically due to a known issue between Faiss and macOS (kyamagu/faiss-wheels#100) The usual mitigations are: Issue Segmentation faults and similar errors on macOS Solution Set the following environment parameters.
Source: https://neuml.github.io/txtai/faq/ There is also this: kyamagu/faiss-wheels#73 (comment)
It would be great to have a programmatic solution as I'm sure there are plenty of macOS users that encounter this error and just move on to another library. |
Hi @davidmezzetti, thanks for the detailed reply! The other backends indeed seem to work fine. I guess an alternative solution would be to have a different default for the index method (e.g. hnsw), but I guess that's not as nice as it would introduce more base dependencies for txtai. For now I'll just use a different backend as I would be using hnsw from faiss anyway, thanks! |
In the past, I had setup.py conditionally install hnswlib for mac/windows and faiss for linux as the defaults. But that became confusing as the results were different based on the OS. I've been hoping the upstream library would find a solution but I've been holding my breath for a while 😄 |
Hi! When running one of the examples, I ran into an issue.
Issue
The following code crashes with a segfault error when
search
is called:Environment info
Running on MacOS, M3, python version=3.10.14.
Venv:
The text was updated successfully, but these errors were encountered: