Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

training_run

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 R_CONFIG_ACTIVE environment variable), or default when unset.

flags

Named list with flag values (see flags()) or path to YAML file containing flag values.

properties

Named character vector with run properties. Properties are additional metadata about the run which will be subsequently available via ls_runs().

run_dir

Directory to store run data within

artifacts_dir

Directory to capture created and modified files within. Pass NULL to not capture any artifcats.

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 TRUE or FALSE to control whether the view is shown explictly. You can also pass "save" to save a copy of the run report at tfruns.d/view.html

envir

The environment in which the script should be evaluated

encoding

The encoding of the training script; see file().

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.


tfruns

Training Run Tools for 'TensorFlow'

v1.5.0
Apache License 2.0
Authors
Daniel Falbel [ctb, cre], JJ Allaire [aut], RStudio [cph, fnd], Mike Bostock [cph] (D3 library - https://d3js.org/), Masayuki Tanaka [cph] (C3 library - http://c3js.org/), jQuery Foundation [cph] (jQuery library), jQuery contributors [cph] (jQuery library; authors: inst/views/components/jquery-AUTHORS.txt), Shaun Bowe [cph] (jQuery visibilityChanged plugin), Materialize [cph] (Materizlize library - https://materializecss.com/), Yuxi You [cph] (Vue.js library - https://vuejs.org/), Kevin Decker [cph] (jsdiff library - https://github.com/kpdecker/jsdiff/), Rodrigo Fernandes [cph] (diff2html library - https://diff2html.xyz/), Ivan Sagalaev [cph] (highlight.js library - https://highlightjs.org/), Yauheni Pakala [cph] (highlightjs-line-numbers library)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.