-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Unable to download model using torch.hub.load(). #33233
Comments
The issue should be resolved. Feel free to reopen the issue. |
Hello, I am running windows 10, installed pytorch 1.4.0, torchvision 0.5.0 When I run the following codes, I got the error message of "Exception has occurred: URLError, " In fact, I want to load the following model, and I got the same error message, I wonder if anybody know how to make "torch.hub.load" work in Windows 10. Many thanks! |
model = torch.hub.load('rwightman/pytorch-pretrained-gluonresnet', 'gluon_resnet34_v1b', pretrained=True) works on my Windows10 system with |
torch.hub.load() command is not working for me. Syntax used: Error: Environment: Windows 10, python 3.7 , torchvision-0.10.0+cu102 Any help to quickly resolve this issue would be appreciated. Thanks! |
same here.
Resolved the issue by downgrading the torch to version 1.8.1 |
This is not resolved and I still experience this bug. Even official COLAB tutorials are bugged. |
import torch
model = torch.hub.load('facebookresearch/pytorchvideo', 'slow_r50', pretrained=True)
Not able to load the model from torch hub. Any fix for that required. |
Got the same issue as @vermavinay982 above. torch 1.9.0 python 3.8.10. Wondering if it's something I'm doing or if we have server issues. Thanks.
|
@herculesdynamics what model are you trying to download? # file: /opt/conda/lib/python3.8/site-packages/torch/hub.py
MASTER_BRANCH = 'master' # CHANGE THIS TO 'main'
ENV_GITHUB_TOKEN = 'GITHUB_TOKEN'
ENV_TORCH_HOME = 'TORCH_HOME' To find your >>> import torch
>>> torch.hub
<module 'torch.hub' from '/opt/conda/lib/python3.8/site-packages/torch/hub.py'> This is the location of hub file, just do @ptrblck Can you confirm this? I was using 1.8.1, and upgraded to 1.9.1 too, both having |
@vermavinay982 thank you very much, that actually worked for me as well! I was able to download slowfast_r50 now. |
Can verify @herculesdynamics solution works. Thank you much! |
Followed @vermavinay982 instructions but the issue still persists. Here is the error message: Kindly assist. ThanksI'm tried the following for custom models: model = torch.hub.load('utralytics/yolov5:main', 'custom', path=run_model_path) Both throw the same error. |
import torch
# works perfectly
model = torch.hub.load('ultralytics/yolov5', 'yolov5m')
# works but requires parameters, including path for pt file
model = torch.hub.load('ultralytics/yolov5', 'custom', path='path/to/best.pt', source='local') @AkanimohOD19A You can try by pointing it to your .pt file, it is working for me. |
@vermavinay982 thanks so much, resolved. |
🐛 Bug
At the moment, attempts to download (at least some) models with
torch.hub.load()
result in 403 errors.
To Reproduce
Steps to reproduce the behavior:
This produces the following error:
NOTE: a copy of the model must not be present in the cache in order for the code snippet above to result in this error.
Expected behavior
Download to complete without an error.
Environment
Additional context
cc @ailzhang
The text was updated successfully, but these errors were encountered: