michaelfeil / infinity

Infinity is a high-throughput, low-latency REST API for serving text-embeddings, reranking models and clip
https://michaelfeil.github.io/infinity/
MIT License
1.32k stars 97 forks source link

unexpected keyword argument 'trust_remote_code' #85

Closed BSVogler closed 8 months ago

BSVogler commented 8 months ago
  File "./infinity/libs/infinity_emb/infinity_emb/transformer/embedder/sentence_transformer.py", line 49, in __init__
    super().__init__(
TypeError: SentenceTransformer.__init__() got an unexpected keyword argument 'trust_remote_code'

The SentenceTransformer does not have this argument. Saw that you were working on it recently however it seems that main branch and the revision branch both have this issue. Basic unit tests could cover that. Let me know if I can support with that.

michaelfeil commented 8 months ago

Hey @BSVogler , It took around 1.5 years for the 2.3.0 release of sentence transformers. With the latest release of 2.3.0 its finally included and models like jina can be used.

thats available for sentence-transformers >=2.3.0 and this is also what should be resolved by pip.

it should work out if you start in a new venv, but definelty if you use poetry in your local env.

michaelfeil commented 8 months ago

https://github.com/UKPLab/sentence-transformers/issues/2352

BSVogler commented 8 months ago

Ah, thank you. I overlooked that SentenceTransformer is used in a dependency and not part of the infinity codebase. I don't have extras=["all"] set, since it loads the Nvidia cuda drivers on Mac so it was not maintaining the sentence transformer dependency.