-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
progress: limit maximum running bars #3500
Conversation
dvc/progress.py
Outdated
@@ -35,6 +35,7 @@ class Tqdm(tqdm): | |||
BYTES_DEFAULTS = dict( | |||
unit="B", unit_scale=True, unit_divisor=1024, miniters=1 | |||
) | |||
MAX_BARS = 20 # maximum parallel bars to display |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally auto-detect; see tqdm/tqdm@80be780:tqdm/utils.py#L263-L330 for inspiration
@casperdcl Could you show before/after capture, please? |
@casperdcl Also, wouldn't it make sense to patch tqdm itself to tidy up unused bars as it goes? |
The script and asciinema recordings from @JIoJIaJIu (see description at the top here) still apply. I can re-generate them but they'd look identical.
This isn't about tidying up unused bars. It's about hiding running bars. Specifically:
By "dynamically" I mean:
|
@casperdcl By |
But you launched with I tried and noticed that it works! 🎉 And it look nicer from the code side One disadvantage - that it flicks too much. I think cause all pbars going up ( |
Yes but at the end of the animation it's run again without the flag |
Interesting idea. I prefer moving up logically as newer bars at the bottom will be less complete and higher bars will be more complete - e.g. assuming similar file sizes:
Rather than more randomly ordered:
Maybe for a different issue/PR? |
Upstream issue for fixing this properly: tqdm/tqdm#918 |
For the record: had a discussion about it last Sat and decided to wait for this functionality to become available in the upstream tqdm. |
Just use latest `tqdm` :)
ce3a104
to
fa0a0bf
Compare
... aaand new version! |
Fixes iterative#3565 Continues iterative#3500 <- iterative#2905
introduceTqdm.MAX_BARS = 20
for parallel displayadd... (more hidden) ...
message for overflow barsauto-detect screen height? Should be done in upstream addnrows
tqdm/tqdm#918tqdm>=4.44.0
which auto-detects screen height with a fallback of20
issue & fix:
(from #3453 (cc @JIoJIaJIu): script for reproducing issue & fix)