Add support for multiple simultaneous progress bars
Sometimes I would like to track two tasks simultaneously. Something like this doesn't work
julia> using ProgressMeter
julia> p1 = Progress(10,1,"a");
julia> p2 = Progress(10,1,"b");
julia> for i = 1:2
next!(p1)
next!(p2)
end
b 10%|██████████▍ | ETA: 0:00:42
In this case the second bar overwrites the first. Would it be possible to create a container of bars that automatically sets the cursor location given which one is being updated, so that all are visible?
it is not documented by I found this feature by chance: you can add the argument offset:
julia> p1 = Progress(10,1,"a"; offset=2);
julia> p2 = Progress(10,1,"b"; offset=1);
julia> for i = 1:10
next!(p1)
sleep(0.1)
next!(p2)
sleep(0.1)
end
this works but will cause problems if p1 and p2 try to update at the same time
I worked on a workaround, that works with multiple workers, which I will clean and make a PR
@MarcMush is this still active? I have some projects that would profit a lot from multiple progress bars (nested algorithms).
it has been in progress for a long time, but not very active, see #157 if you want to use what I wrote so far (it should be working fine), you can do
] add ProgressMeter#a5c5b2c
BUT, if you "just" need nested progress bars, that are working on a single core, you can use the offset keyword like I did in the above post
Thanks - yes, all progress reporting would be collected and ProgressMeter called from a single core. I haven't managed to get the offset-"trick" working with Jupyter, though.
It looks like it's not working with IJulia, which means my PR shouldn't work either
https://user-images.githubusercontent.com/35898736/165163043-8dde54b2-afa1-46a4-a846-571620ab08f7.mp4
you can probably open a new issue for that