-
-
Notifications
You must be signed in to change notification settings - Fork 16.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
Module collision when loading more than one model with Torch Hub #5083
Comments
👋 Hello @carloalbertobono, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at [email protected]. RequirementsPython>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started: $ git clone https://github.com/ultralytics/yolov5
$ cd yolov5
$ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@carloalbertobono thanks for the bug report. I am able to reproduce the issue using your code in colab. I'm not sure there's a simple fix, but also this might be slightly outside of our scope. You should definitely raise on pytorch and/or hub repos also, and link to this issue. Thanks! https://github.com/pytorch/pytorch |
thank you @glenn-jocher, I'll do it! |
@glenn-jocher this is definitely an issue on the torchhub side (which I'm looking into), so feel free to close this one |
@NicolasHug thanks for looking into this! I'd imagine loading multiple hub models from different sources will become more common as the feature gains adoption, so probably worth the effort to find a fix. Will close here and follow pytorch/hub#243 |
Hi, I think I have a similar issue to #2414 (I commented there but later realized that the issue was closed)
It prevents from loading more than one model using torch.hub
If I'm not mistaken by reading the thread, loading the model with torch.hub shadows some module names, that then become unusable within torch.
I'm using torch '1.9.1+cu102' on a Ubuntu 20.04 machine and to reproduce I do:
that ends up in
reversing the load order obviously ends up with:
Is there some workaround which I'm not seeing?
Thank you very much, also for the awesome project itself
cb
The text was updated successfully, but these errors were encountered: