futureverse / futureverse/future
Different plan()s for different futures
- Dominant language
- R
- Stars
- 1k
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
Related: wlandau-lilly/drake#169. It would be amazing if a single call to `future_lapply()` could distribute simultaneous futures over a list of alternative pre-built `plan()`s. I am not quite sure about the interface, but I can picture how 5 futures might run on a local machine and another 5 might *simultaneously* go to SLURM.
```r
library(future.batchtools)
plans <- list(plan1 = plan(multicore), plan2 = plan(batchtools_slurm(...)))
plan_map <- rep(c("plan1", "plan2"), each = 5)
future_lapply(
X = 1:10,
FUN = sqrt,
plans = plans,
plan_map = plan_map
)
```
It may seem silly to juggle plans in a single call to `future_lapply()`, but it would be a huge help for [drake](https://github.com/wlandau-lilly/drake).
Contributor guide
Assessment
This issue has not been assessed yet.