-
Notifications
You must be signed in to change notification settings - Fork 91
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
[RFC] add support for multiple simultaneous progressbars #157
base: master
Are you sure you want to change the base?
Conversation
This is great! It's exactly what I was just looking for, and seems stable on a few trials across remote distributed workers. One minor thought, I noticed that the |
Master now has the option to update the desc from |
I added tests and fixed some bugs due to overshooting @ianshmean it wouldn't be difficult to change it, by passing |
i'm working on it here https://github.com/MarcMush/ProgressMeter.jl/tree/parallel_update |
This looks really nice. Does it work for tasks distributed over threads as well? |
yes, it should work, you can even use it on a single core |
I think it would be really useful for parallel long-running tasks. For example, it would be a nice improvement in the UX of parallel algorithms in Turing.jl. |
It would be nicer if you could encapsulate any other progress bars, e.g. p = MultipleProgress([Progress(...), ProgressUnknown(...), ProgressThresh(...)]) |
Whats the status of this? |
I did some work on this PR |
I really like the idea, and I enabled it for
note that right now, and with one these solutions (except the first one) the first step won't be included in the timing except if initialized with |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #157 +/- ##
==========================================
+ Coverage 93.48% 97.21% +3.72%
==========================================
Files 1 2 +1
Lines 399 717 +318
==========================================
+ Hits 373 697 +324
+ Misses 26 20 -6 ☔ View full report in Codecov by Sentry. |
I've changed to a Dict for storing the progressbars and throws an error when trying to re-add a progess with the same id. It is possible to use Ints or any other type for indexing. The main progress can be specified with the kwarg |
this seems actually ready? gentle bump for a nod from main devs and we can do documentation etc. and ship it? |
have you tested it? I'd appreciate other people trying it and giving feedback, see if it is actually what is wanted |
I read the examples here and I'm exactly using Distributed pmap so I think yes? |
this PR adds |
I have multiple sub tasks and also |
great, you can use this PR with |
- `addprogress!` replaced with `setindex!` - add `ping(::ParallelProgress)` for testing - use `try_put!` for not erroring when over-shooting - remove `keys(::MultipleProgress)` - use of `waitfor` in tests for more intelligent waiting - use new keyword-only syntax
I changed the syntax for adding new progressbars, now it simply works with mp = MultipleProgress()
mp[1] = Progress(10)
next!(p[1]) |
following my answer in #156 , this adds two types of progressbars that mimic
Progress
:ParallelProgress
is pretty much the example in the readme and works like that :MultipleProgress
spawns multiple progress bars usingoffset
It is also possible to add progressbars from another worker
the main progress can be a
Progress
, either counting all individual steps, or counting finished tasks. It can also be aProgressUnknown
the other progresses can be
Progress
,UnknownProgress
orProgressTresh
feel free to try this PR with
]add ProgressMeter#5c21f5d
and give feedback and suggestionsEverything should be explained in
?MultipleProgress
closes #9, closes #96, closes #97, closes #125, closes #156, closes #253