Skip to content

PyTorch Hub _verbose=False fix2#7550

Merged
glenn-jocher merged 16 commits intomasterfrom
update/hubverbose
Apr 23, 2022
Merged

PyTorch Hub _verbose=False fix2#7550
glenn-jocher merged 16 commits intomasterfrom
update/hubverbose

Conversation

@glenn-jocher
Copy link
Copy Markdown
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
Copy Markdown
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