Repository: pytorch
Issue: torch.hub.load can confuse external python package with local python package. 
Labels: triaged,module: hub

## 🐛 Bug

Assume you want to load a model using torch.hub. For instance: 
`torch.hub.list('githubaddress', 'model', pretrained=True)`

Now assume in your own project you have a package named 'models', 
Also assume that the external github repository has also a package named 'models'. 

`torch.hub.load` invokes ->   `torch.hub.import_module` invokes -> `importlib.util.exec_module` 
Unfortunately, the importlib confuses the local models package with the external models package! 

## To Reproduce

Steps to reproduce the behavior:

1. Make a project with a the following structure:
   + a.py 
   + - + models 
         +  __init__.py 
2.  Add following to a.py 
`
import torch 
from models import * 
print(torch.hub.list('facebookresearch/deit:main'))
`
3. The list will be empty, where if you really look into the github repository or comment out the line `from models import *` you see there are many models available.


## Expected behavior

I expected that the users of torch.hub, either users who publish models or users who use the published models could develop their own projects without any concerns about what package names has the other side been using. This makes it impossible to think of published models as black-box easy-to-use plug-in-and-play models. 

## Environment

Collecting environment information...
PyTorch version: 1.9.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 11.3.1 (arm64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.11)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.6 (default, Jun 28 2021, 19:24:41)  [Clang 12.0.5 (clang-1205.0.22.9)] (64-bit runtime)
Python platform: macOS-11.3.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.21.1
[pip3] pytorch-pretrained-vit==0.0.7
[pip3] torch==1.9.0
[pip3] torchvision==0.10.0
[conda] Could not collect
(default) 2:01 test$ python content.py > output.txt
(default) 2:01 test$ vim output.txt 
(default) 2:01 test$ cat output.txt 
Collecting environment information...
PyTorch version: 1.9.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 11.3.1 (arm64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.11)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.6 (default, Jun 28 2021, 19:24:41)  [Clang 12.0.5 (clang-1205.0.22.9)] (64-bit runtime)
Python platform: macOS-11.3.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.21.1
[pip3] pytorch-pretrained-vit==0.0.7
[pip3] torch==1.9.0
[pip3] torchvision==0.10.0
[conda] Could not collect



cc @nairbv @NicolasHug