Skip to content

Update train, val tqdm to fixed width#5367

Merged
glenn-jocher merged 16 commits intomasterfrom
udpate/tqdm
Nov 10, 2021
Merged

Update train, val tqdm to fixed width#5367
glenn-jocher merged 16 commits intomasterfrom
udpate/tqdm

Conversation

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

/rebase

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

2 participants