-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
fix
#7507
Conversation
Attempt to define environment variable before utils.general loads.
Test code: import torch
# Model
model = torch.hub.load('ultralytics/yolov5:update/verbose_hub', 'yolov5s', verbose=False)
# Images
dir = 'https://ultralytics.com/images/'
imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batch of images
# Inference
results = model(imgs)
results.print() # or .show(), .save() |
for more information, see https://pre-commit.ci
Test fails, all output still seen in console. Seems that our custom verbose argument conflicts with the default torch hub verbose argument. https://pytorch.org/docs/stable/hub.html#torch.hub.load |
@glenn-jocher how about we rename our argument to yolo_verbose? |
@Powercube7 I can try that! |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Closing PR as replaced by PR #7550 |
@Powercube7 I've implemented your idea now in PR #7550 with |
Attempt to define environment variable before utils.general loads.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Refinement of logging and error messaging in YOLOv5's download and creation functions.
📊 Key Changes
YOLOv5_VERBOSE
to control verbosity.print
statements toLOGGER.info
for better control over logging.LOGGER
variable within the download functions for consistent logging._verbose
instead ofverbose
where appropriate.🎯 Purpose & Impact
YOLOv5_VERBOSE
environment variable provides unified verbosity control across different parts of the code.print
toLOGGER.info
offers developers a more granular logging level, which can help with debugging.