-
Notifications
You must be signed in to change notification settings - Fork 39
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
progressbar with the doMC package? #39
Comments
Or the parallel package? If not, +1 for this feature. |
I am not sure what it would take to implement this, to be honest. E.g. for parallel, one would need parallel to communicate back, how much of the work has been done already. Is that even possible? |
@gaborcsardi I did some searching and the following is what I've found: library("foreach")
library("doParallel")
library("progress")
registerDoParallel(parallel::makeCluster(7, outfile = ""))
pb <- progress_bar$new(
format = " [:bar] :percent in :elapsed",
total = 30, clear = FALSE, width = 80, force = T)
a <- foreach (i = 1:30) %dopar% {
pb$tick()
Sys.sleep(0.5)
}
pb <- txtProgressBar(title = "Iterative training", min = 0, max = 30, style = 3)
foreach (i = 1:30) %dopar% {
setTxtProgressBar(pb, i)
Sys.sleep(0.5)
}
stopCluster(cl) The
I think the reason I think mimicking what |
I don't know if there is any update on this, what about |
In general this is not possible currently, I believe. You might get lucky if the parallel processes use the same terminal as the main process, but in general we would need support from parallel to implement this. |
Is the progress package also suitable for the doMC package?
The text was updated successfully, but these errors were encountered: