Run a pipeline of targets in parallel with transient future workers.
This function is like tar_make()
except that targets
run in parallel with transient future
workers. It requires
that you declare your future::plan()
inside the
target script file (default: _targets.R
).
future
is not a strict dependency of targets
,
so you must install future
yourself.
tar_make_future( names = NULL, shortcut = targets::tar_config_get("shortcut"), reporter = targets::tar_config_get("reporter_make"), workers = targets::tar_config_get("workers"), callr_function = callr::r, callr_arguments = targets::callr_args_default(callr_function, reporter), envir = parent.frame(), script = targets::tar_config_get("script"), store = targets::tar_config_get("store") )
names |
Names of the targets to build or check. Set to |
shortcut |
Logical of length 1, how to interpret the |
reporter |
Character of length 1, name of the reporter to user.
Controls how messages are printed as targets run in the pipeline.
Defaults to
|
workers |
Positive integer, maximum number of transient
|
callr_function |
A function from |
callr_arguments |
A list of arguments to |
envir |
An environment, where to run the target R script
(default: The |
script |
Character of length 1, path to the
target script file. Defaults to |
store |
Character of length 1, path to the
|
To configure tar_make_future()
with a computing cluster,
see the future.batchtools
package documentation.
NULL
except if callr_function = callr::r_bg()
, in which case
a handle to the callr
background process is returned. Either way,
the value is invisibly returned.
Other pipeline:
tar_make_clustermq()
,
tar_make()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ future::plan(future::multisession, workers = 2) list( tar_target(x, 1 + 1), tar_target(y, 1 + 1) ) }, ask = FALSE) tar_make_future() }) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.