Issue
Does anyone have experience working with SentenceTransformer (Bert)?
My Code:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('roberta-large-nli-stsb-mean-tokens')
My Error:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ga2943/.cache\\torch\\sentence_transformers\\public.ukp.informatik.tu-darmstadt.de_reimers_sentence-transformers_v0.2_roberta-large-nli-stsb-mean-tokens.zip\\modules.json'
Once in a while I get a different error running the same Code with another Bert-model:
PermissionError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\ga2943/.cache\\torch\\sentence_transformers\\public.ukp.informatik.tu-darmstadt.de_reimers_sentence-transformers_v0.2_bert-large-nli-cls-token.zip\\model.zip'
(Translates to: Data is beeing used in a different Process at the time, which cant be the case. I restarted my machine to ensure all programs are closed in the background but no difference)
The first time I ran my code it worked. It downloaded the Sentenceencoder I wanted (different Bert model) Now that I want to test a different model, it does not download it but gives me the errors.
Funny thing is, on a different Computer I was able to load a different model but it resulted in the same case. Only the first ever downloaded model works on the machine.
Any ideas? Still getting the error, no one knows how to fix it?
Solution
I had to re-install everything over again to solve the issue. I cant put my finger on what caused the error. As I did not delete or update anything myself I am assuming anaconda patched something without letting me know.
The second error still remains and occurs unpredictable from time to time.
Answered By - Adrian_G
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.