progress: limit maximum running bars#3500
Conversation
There was a problem hiding this comment.
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 treeverse#3565 Continues treeverse#3500 <- treeverse#2905
introduceTqdm.MAX_BARS = 20for parallel displayadd... (more hidden) ...message for overflow barsauto-detect screen height? Should be done in upstream addnrowstqdm/tqdm#918tqdm>=4.44.0which auto-detects screen height with a fallback of20issue & fix:
(from #3453 (cc @JIoJIaJIu): script for reproducing issue & fix)