pytorch / pytorch/vision

Torch Hub download fails due to Torchvision dependency?

Open
#5,813 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: hub needs reproduction
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🐛 Describe the bug

Running the following code returns the error seen below. It seems like there is some type of dependency or call to torchvision. Torchvision, however, doesn't list the new efficientnet models.

Screenshot 2022-04-13 004546

import torch
from torch import hub
#import torchvision.models as models

resnet18_model = torch.hub.load('pytorch/vision:main',
                         'resnet18',
                         pretrained = True)

Screenshot 2022-04-13 004413

It seems like there is something missing. I have cleared my .cache folder, and even updated the efficientnet.py code on my local machine to match the latest. Still receiving this Import Error. I am running the following versions:

Screenshot 2022-04-13 004800

Even if I do a simple:

torch.hub.list('pytorch/vision')

I receive the following error:

Screenshot 2022-04-13 004900

Versions

Screenshot 2022-04-13 005622

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the shown torch.hub.load and torch.hub.list calls, then inspect the efficientnet.py dependency path mentioned in the report. Compare the installed torchvision models and the repository revision used by Torch Hub. Done means both hub calls complete without the reported import error and the expected EfficientNet models are available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.