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

PyTorch Hub _verbose=False fix2 #7550

Merged
merged 16 commits into from
Apr 23, 2022
Merged

PyTorch Hub _verbose=False fix2 #7550

merged 16 commits into from
Apr 23, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 23, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refactoring and cleanup of download handling in the YOLOv5 code base.

πŸ“Š Key Changes

  • The verbose parameter in model creation methods has been renamed to _verbose to possibly indicate internal usage.
  • Removed font checks for non-Latin characters in train.py and moved them to check_dataset in general.py.
  • Implemented centralized logging with LOGGER, standardizing the way messages are logged during downloads in downloads.py.
  • Removed some redundant font checks from plots.py.

🎯 Purpose & Impact

  • πŸ’» Developers: Clearer codebase with a standardized approach for logging, improving maintainability.
  • πŸ“ˆ Users: More consistent and informative download progress for models, enhancing user experience with better feedback when downloading files.
  • 🌐 Global usage: Enhanced support for non-Latin datasets, ensuring proper font management for different character sets.

@glenn-jocher
Copy link
Member Author

glenn-jocher commented Apr 23, 2022

PR works now! PyTorch Hub tutorial has been updated with silent loading usage example:

Silence Outputs

Models can be loaded silently with _verbose=False:

model = torch.hub.load('ultralytics/yolov5', 'yolov5s', _verbose=False)  # load silently

@glenn-jocher glenn-jocher merged commit 7043872 into master Apr 23, 2022
@glenn-jocher glenn-jocher deleted the update/hubverbose branch April 23, 2022 18:26
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* PyTorch Hub `_verbose=False` fix2

* Update downloads.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update hubconf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* PyTorch Hub `_verbose=False` fix2

* Update downloads.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update hubconf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

1 participant