-
Notifications
You must be signed in to change notification settings - Fork 90
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
Make @showprogress update on inner loop when using nested loops #239
Comments
While this would certainly be nice to have, this can be solved manually by setting up a |
Has their been any update on this? One key usage here is the ability of long-running tasks on parallel workers report their progress, something like
Looking at the source code, this is not currently possible since
the
|
By using the example in the readme and using p = Progress(4*100)
channel = RemoteChannel(() -> Channel{Bool}(), 1)
@async while take!(channel) next!(p) end
pmap(1:4) do x
sumval = 0
for i in 1:100
sleep(0.1)
sumval += i
put!(channel, true)
end
sumval^2
end
put!(channel, false) |
alternatively, with #157 (not yet merged) ]add ProgressMeter#5c21f5d
using Distributed
addprocs(4)
@everywhere using ProgressMeter
p = ParallelProgress(4*100)
pmap(1:4) do x
sumval = 0
for i in 1:100
sleep(0.1)
sumval += i
next!(p)
end
sumval^2
end |
I like the
@showprogress
macro very much, though I think it does not work well with nested loops. What I mean: I would expect the progress bar created withto behave exactly like
, ie filling up with 1-percent increments. Instead, the progress bar from the first example fills up with 10-percent increments, ie is analogous to
I am not sure if this is possible, but I think in such cases it would be very nice to have the macro determine the overall number of iterations of the innermost loop in order to have less waiting time between updates.
The text was updated successfully, but these errors were encountered: