-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
Cache may be out of date even after: force_reload = True #5923
Comments
👋 Hello @niclastrelle, 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. |
@niclastrelle your environment does not meet the requirements. Root error is:
Please ensure you meet all dependency requirements if you are attempting to run YOLOv5 locally. If in doubt, create a new virtual Python 3.8 environment, clone the latest repo (code changes daily), and 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. |
your problem will be fixed after you fix this error : ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html you should use this command if using pip : pip install ipywidgets or : conda install -c conda-forge ipywidgets with conda. |
Same Error File ~/.cache\torch\hub\ultralytics_yolov5_master\hubconf.py:49, in _create(name, pretrained, channels, classes, autoshape, verbose, device) File ~/.cache\torch\hub\ultralytics_yolov5_master\models\common.py:344, in DetectMultiBackend.init(self, weights, device, dnn, data, fp16, fuse) File ~/.cache\torch\hub\ultralytics_yolov5_master\models\experimental.py:80, in attempt_load(weights, device, inplace, fuse) KeyError: 'model' During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) Exception: 'model'. Cache may be out of date, try I trained the yolov5 model on custom dataset over colab and saved the model to use it for prediction over my local PC. But after trying everything, even making new env cant able to do that CODE IS: import torch from utils.plots import plot_one_boxdef countTree(img):
|
@RANA-ATI the error
Additionally, I see that you are specifying Please double-check these points, and if the issue persists, I recommend retraining the model in the same environment where you intend to use it for inference, to ensure compatibility and prevent any issues related to environment mismatch. If you run into further issues, feel free to visit our documentation, or if you encounter a bug, please submit a new issue for assistance. |
Search before asking
YOLOv5 Component
PyTorch Hub
Bug
Following exception:
Exception: Cache may be out of date, try
force_reload=True. See https://github.com/ultralytics/yolov5/issues/36 for help.
tried the trick with:
model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True, force_reload=True)
but still wont work.
Full error message:
Environment
No response
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: