UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
15.42k stars 2.5k forks source link

raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") AttributeError: 'SentenceTransformer' object has no attribute 'model_body' #2942

Open Keven-Don opened 2 months ago

Keven-Don commented 2 months ago

I had meet some erros, at begin I think maybe I download the model wrongly, then I redo download but the errors still exist,my python version == 3.11.7 and sentence-transformers ==2.31.0, my transformers version == 4.44.2 , jesus crisp, you guys know how to fix it? ,

tomaarsen commented 2 months ago

Hello!

model_body does not exist in Sentence Transformers: https://github.com/search?q=repo%3AUKPLab%2Fsentence-transformers%20model_body&type=code Are you perhaps using SetFit? Could you share a snippet of code to reproduce the issue? Also, 2.31.0 is not a Sentence Transformers version that exists. The highest 2.* version is 2.7.0. https://pypi.org/project/sentence-transformers/#history