training_run {tfruns} | R Documentation |
Run a training script
Description
Run a training script
Usage
training_run(
file = "train.R",
context = "local",
config = Sys.getenv("R_CONFIG_ACTIVE", unset = "default"),
flags = NULL,
properties = NULL,
run_dir = NULL,
artifacts_dir = getwd(),
echo = TRUE,
view = "auto",
envir = parent.frame(),
encoding = getOption("encoding")
)
Arguments
file |
Path to training script (defaults to "train.R") |
context |
Run context (defaults to "local") |
config |
The configuration to use. Defaults to the active configuration
for the current environment (as specified by the |
flags |
Named list with flag values (see |
properties |
Named character vector with run properties. Properties are
additional metadata about the run which will be subsequently available via
|
run_dir |
Directory to store run data within |
artifacts_dir |
Directory to capture created and modified files within.
Pass |
echo |
Print expressions within training script |
view |
View the results of the run after training. The default "auto"
will view the run when executing a top-level (printed) statement in an
interactive session. Pass |
envir |
The environment in which the script should be evaluated |
encoding |
The encoding of the training script; see |
Details
The training run will by default use a unique new run directory
within the "runs" sub-directory of the current working directory (or to the
value of the tfruns.runs_dir
R option if specified).
The directory name will be a timestamp (in GMT time). If a duplicate name is generated then the function will wait long enough to return a unique one.
If you want to use an alternate directory to store run data you can either
set the global tfruns.runs_dir
R option, or you can pass a run_dir
explicitly to training_run()
, optionally using the unique_run_dir()
function to generate a timestamp-based directory name.
Value
Single row data frame with run flags, metrics, etc.