Skip to content

Different plan()s for different futures #181

Description

@wlandau-lilly

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions