Open qzd-1 opened 3 months ago
Would you please provide more information? OS and distribution, SentenceTransformer version, Python version?
I cannot reproduce this error. I use Python 3.12.4 on Ubuntu 24.04 both
import sentence_transformers
import infinity
and
import infinity
import sentence_transformers
produce no error.
Also got the same error, that is "fixed" when changing the import order. Working:
import infinity
from sentence_transformers import SentenceTransformer
Segmentation Fault:
from sentence_transformers import SentenceTransformer
import infinity
Ubuntu 22.04.3 LTS Python 3.10.14
sentence-transformers 3.0.1 infinity-sdk 0.3.0.dev8
It might be caused by the lower version of python. Two solutions:
In my machine (Ubuntu 24.04, Conda Python 3.12.4), Segmentation Fault will happen when the libstdcxx version is 12.4.0
If you use conda, you can try the following command:
conda install -c conda-forge libstdcxx-ng
It will install libstdcxx 14.1.0 in the conda environment, and solve the SIGSEGV error.
There is a version conflict between SentenceTransformer and infinity-sdk 0.3.0.dev5, resulting in a Segmentation fault.