Executes a list of fmri_jobs, returning an fmri_batch_result. By
default each job is isolated: a failure is captured rather than aborting the
batch. Set parallel = TRUE to dispatch through the active
future::plan() (e.g. multisession, cluster, or a
future.batchtools cluster backend).
Usage
run_jobs(
jobs,
parallel = FALSE,
progress = FALSE,
on_error = c("isolate", "stop"),
backend = NULL
)Arguments
- jobs
A single fmri_job or a list of them.
- parallel
Logical shorthand;
TRUEselects the"future"backend,FALSEthe"sequential"one. Ignored ifbackendis given.- progress
Logical; per-job fitting progress.
- on_error
Either
"isolate"(default; capture per-job errors) or"stop"(fail the batch on the first error).- backend
Optional execution backend name (see
run_backends()). Overridesparallel. The"future"backend honours the activefuture::plan()(includingfuture.batchtoolscluster plans).
Examples
if (FALSE) { # \dontrun{
jobs <- instantiate(tmpl, manifest)
future::plan(future::multisession, workers = 4)
res <- run_jobs(jobs, parallel = TRUE)
values <- batch_values(res)
} # }