question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Downloading Pre-Trained Model Failed

See original GitHub issue

The following instruction works well in Google Colab: model = SentenceTransformer('bert-base-nli-stsb-mean-tokens')

However, when running locally in Jupyter Lab on Windows, I get: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\a324448/.cache\\torch\\sentence_transformers\\public.ukp.informatik.tu-darmstadt.de_reimers_sentence-transformers_v0.2_bert-base-nli-mean-tokens.zip\\modules.json'

The folder public.ukp.informatik.tu-darmstadt.de_reimers_sentence-transformers_v0.2_bert-base-nli-mean-tokens.zip\modules.zip’ is empty on my Window machine.

Can you provide a link where I could download the model?

Note: Correcting C:\\Users\\a324448/.cache\\torch... to C:\\Users\\a324448\\\.cache\\torch... did not help.

BTW: Great work with the Repo.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

19reactions
khieunguyencommented, Feb 14, 2020

Hi @20v100 @CheekyDave

I got the same problem on Ubuntu. This bug happened due to the interruption during the SentenceTransformers download the models. Let delete everything placed in the torch cached folder: for example in your case 'C:\Users\a324448/.cache\torch\sentence_transformers'

Then reload model: model = SentenceTransformer(‘bert-base-nli-stsb-mean-tokens’) Hope this helps.

Best

9reactions
nreimerscommented, Oct 7, 2019

Hi @20v100 Windows makes sadly a lot of problem when you try to run deep learning experiments on it. If someone finds the issue, why the download doesn’t work for windows, please post it here (or create a PR).

You can find all models for download here: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/

Just unzip them and specify the path to the models on your system.

Best regards Nils Reimers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Starting today, I get an error downloading pre-trained models
I expect the pre-trained model to be downloaded. This issue just started today.
Read more >
NGC failed to download pretrained model - TAO Toolkit
hello,I have been using tao-toolkit yolov3 training for 1 month, it had no problem till today. After checking, I can download it successfully. ......
Read more >
A problem about downloading pretrained models - Kaggle
New to kaggle kernel, and i am going to use kernel to train a image classification model using transfer-learning. But when i tried...
Read more >
Download pretrained model - vision - PyTorch Forums
The error indicates that the download failed due to an issue in the name resolution. I've just re-downloaded the pretrained model and cannot...
Read more >
How to manually load pretrained model if I can't download it ...
You're using load_model on weights, instead of a model. You need to have a defined model first, then load the weights.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found