Related: ropensci/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.
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.
Related: ropensci/drake#169. It would be amazing if a single call to
future_lapply()could distribute simultaneous futures over a list of alternative pre-builtplan()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.It may seem silly to juggle plans in a single call to
future_lapply(), but it would be a huge help for drake.