futureverse / futureverse/progressr

How to do multiple progress bars, especially when running nested futures?

Open
#125 1 comment 1 reaction 0 assignees View on GitHub
feature/nested-progress
Dominant language
R
Stars
299
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Hi,

For nested future.apply::future_apply, furrr::future_map and purrr::map, is it possible to construct a progress report neatly so that the hierarchical arrangement of sub-loops or child processes is clear. e.g. something like this (kind of like `str`):

```
plan(list(tweak(multicore, workers = 2),
tweak(multicore, workers = 3)
) )

future.apply::future_apply(
X = tibble("a" = 100:200),
MARGIN = 1,
FUN = function(a1) {

future.apply::future_apply(
X = tibble("b" = 1:a1),
MARGIN = 1,
FUN = function(b1) {

return(b1^2)

} )

} )
```

> Level 1 #1 |====================== | 64%
> .... Level 2 #1 |=============================== | 90%
> .... Level 2 #2 |====================== | 65%
> .... Level 2 #3 |============ | 37%
> Level 1 #2 |==================== | 43%
> .... Level 2 #1 |==================== | 43%
> .... Level 2 #2 |==================== | 43%
> .... Level 2 #3 |==================== | 43%

From the vignette, it doesn't seem apparent as to how this may be done - it only contains examples to show only one overall bar. Is this a thing that can be done with progressr?

thanks in advance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.