Skip to content
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

Add force_reload=True when loading model using torch hub #10460

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

developer0hye
Copy link
Contributor

@developer0hye developer0hye commented Dec 10, 2022

Signed-off-by: Yonghye Kwon developer.0hye@gmail.com

It is related to #6948.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced model reloading in YOLOv5 tutorial notebook.

πŸ“Š Key Changes

  • The tutorial Jupyter notebook now includes a force_reload parameter when loading the YOLOv5 model with torch.hub.load.

🎯 Purpose & Impact

  • Purpose: To ensure that the latest model is always downloaded and loaded, even if a cached version exists.
  • Impact: Users will always run inference with the most updated version of YOLOv5, which is especially helpful for newcomers experimenting with the tutorial notebook or for those who need to test recent changes. This minor update promotes best practices in model loading. πŸ”„πŸ†•

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@glenn-jocher
Copy link
Member

@developer0hye we've left this off the notebook since notebook environments won't have existing caches, so they'll download new caches by default the first time this cell block is run.

@developer0hye
Copy link
Contributor Author

developer0hye commented Dec 12, 2022

@glenn-jocher

Thanks for your feedback!

I faced a problem when I programmed code by referencing this colab code. So I made a PR.

Do you think that it is unnecessary?

@glenn-jocher
Copy link
Member

@developer0hye ah ok, sure let's do it then.

@glenn-jocher glenn-jocher merged commit 357cde9 into ultralytics:master Dec 12, 2022
@glenn-jocher glenn-jocher changed the title add force_reload=True when loading model using torch hub Add force_reload=True when loading model using torch hub Dec 12, 2022
@glenn-jocher
Copy link
Member

@developer0hye PR is merged. Thank you for your contributions to YOLOv5 πŸš€ and Vision AI ⭐

@developer0hye developer0hye deleted the patch-11 branch December 12, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants