-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
TypeError: forward() got an unexpected keyword argument 'return_dict' #1553
Comments
Could you share a colab that shows this error? The above code works for me |
Hello Nils, To be more precise, it happens in a conda environnent when installing the packages from conda-forge.
and running the lines in the python terminal :
|
Here is the full detail of the libraries used in such environment :
|
I ran this on my Windows machine using Anaconda and it works, giving me back the embeddings. Maybe re-installing your conda? Or maybe installing sentence transformers via pip? |
Ok I finally found a workaround, I share it here so it can help someone that could have the same problem.
Maybe I had an old pytorch version installed in my The following command solved my problem: Thank you anyway @nreimers, sorry for disturbing :) |
I have an error with SentenceTransformers that throws TypeError: forward() got an unexpected keyword argument 'return_dict'
Here is the code to reproduce :
Version tested :
The text was updated successfully, but these errors were encountered: