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

Update train, val tqdm to fixed width #5367

Merged
merged 16 commits into from
Nov 10, 2021
Merged

Update train, val tqdm to fixed width #5367

merged 16 commits into from
Nov 10, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Oct 27, 2021

Attempt to solve #2685 (result: does not solve issue)

Attempting https://stackoverflow.com/questions/41707229/tqdm-printing-to-newline

image

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved progress bar formatting and terminal size adaptation for training and validation scripts.

πŸ“Š Key Changes

  • Added NCOLS variable to manage progress bar length dynamically according to terminal window size.
  • Modified progress bar in train.py and val.py to use the new NCOLS setting, which adjusts to the terminal width.
  • Improvement to the progress bar formatting to make it look consistent across different terminal sizes.

🎯 Purpose & Impact

  • These changes aim to enhance the user interface by ensuring progress bars during training and validation are sized appropriately for the user's terminal, improving readability and aesthetics. πŸ–₯️
  • Users will benefit from a cleaner, more responsive output that adapts to various terminal environments. This can be particularly helpful for those running YOLOv5 on remote servers or containers where terminal dimensions can vary. πŸ“ˆ
  • The main impact is on the user experience; there's no change to the underlying machine learning or inference functionalities. πŸš€

@glenn-jocher
Copy link
Member Author

/rebase

@glenn-jocher
Copy link
Member Author

/rebase

Borda
Borda previously approved these changes Nov 10, 2021
@glenn-jocher glenn-jocher changed the title Update tqdm for fixed width Update train, val tqdm to fixed width Nov 10, 2021
@glenn-jocher glenn-jocher merged commit 61c5019 into master Nov 10, 2021
@glenn-jocher glenn-jocher deleted the udpate/tqdm branch November 10, 2021 14:47
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update tqdm for fixed width

* Update val.py

* Update val.py

* Try ncols= in train.py

* NCOLS

* NCOLS

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

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

* bar_format

* position 0 leave true

* exp0

* auto

* auto

* Cleanup

* Cleanup

* Cleanup

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.

None yet

2 participants