-
Notifications
You must be signed in to change notification settings - Fork 243
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
tqdm progress bar improvements #2114
tqdm progress bar improvements #2114
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2114 +/- ##
============================================
+ Coverage 0 35.92% +35.92%
============================================
Files 0 476 +476
Lines 0 42482 +42482
============================================
+ Hits 0 15263 +15263
- Misses 0 27219 +27219
|
run pylint pre-commit tests |
@nikita-savelyevv when i try to fix logs in ci like
And found that progress bar from pip looks good in one line
What you think to use https://github.com/Textualize/rich#rich-library instead of tqdm, and in notebooks it's looks better. May be will be better to use @nikita-savelyevv @alexsu52 @andrey-churkin @kshpv what you think about it? |
Looks nice! |
@AlexanderDokuchaev perhaps this is not applicable to progress bars exactly, but |
@AlexanderDokuchaev Thanks for the suggestion. I propose to add So let's merge this PR first, I'll then open another for rich. |
Changes
Fixed an issue with wrong
tqdm
bar length in the case when calibration dataset length is less thansubset_size
.Reproducer: nikita-savelyevv@f0951c1
Before:
Statistics collection: 34%|██████ | 101/300 [00:03<00:06, 28.66it/s]
After:
When dataset has
__len__
:Statistics collection: 100%|██████████████████| 101/101 [00:03<00:00, 28.20it/s]
When dataset doesn't have
__len__
:Statistics collection: 34%|██████ | 101/300 [00:03<00:06, 29.45it/s]
Improved progress bar GUI when ran from notebooks.
Before:
or (in some browsers progress bar takes up multiple lines):
After:
In console the progress bar is the same.
Reason for changes
User experience improvement.
Related tickets
112627
Tests