Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 18, 2022

@AyushExel centralized TQDM bar format defined in general.py and used everywhere. Slightly simpler format, removed iteration and time remaining.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refactor progress bar format in YOLOv5's training and validation scripts.

📊 Key Changes

  • Introduced a new global variable TQDM_BAR_FORMAT to standardize the tqdm progress bar format.
  • Replaced hardcoded tqdm bar format strings with the new global TQDM_BAR_FORMAT variable across multiple scripts (train.py, validate.py, classify/train.py, classify/val.py, segment/train.py, segment/val.py, utils/autoanchor.py, and utils/dataloaders.py).

🎯 Purpose & Impact

  • Consistency and Maintainability: The use of a global variable for the progress bar format ensures consistency across different modules and makes future changes to the format simpler and more maintainable.
  • Enhanced User Experience: The updated progress bar format includes additional information like total number and elapsed time, providing a more informative and user-friendly interface during model training and validation.
  • Potential Decrease in Visual Clutter: By standardizing the progress bar, the visual output during long training processes is potentially less cluttered, with important metrics being easier to read.

@glenn-jocher glenn-jocher self-assigned this Nov 18, 2022
@glenn-jocher glenn-jocher merged commit 0322bb3 into master Nov 18, 2022
@glenn-jocher glenn-jocher deleted the tqdm_bar_format branch November 18, 2022 20:39
@glenn-jocher glenn-jocher mentioned this pull request Nov 30, 2022
1 task
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