Launch a guild run
Usage
guild_run(
opspec = "train.R",
flags = NULL,
...,
echo = TRUE,
as_job = getOption("guildai.run_as_job", TRUE)
)Arguments
- opspec
typically a path to an R script, but could be any string that guild recognizes as a valid operation.
- flags
flag values for the run(s).
A named list or vector like
c(noise = .3, dropout = .4). Lists with vectors of length greater than 1 are automatically expanded into a grid of combinations for a batch of runs. For example,list(noise = c(.2, .3), dropout = c(.4, .5)expands to a batch of 4 runs.A dataframe of flags for a batch of runs, one row per run.
A scalar string like
"noise=.3 dropout=.4". Any flags specification accepted at the terminal is valid here as well.
- ...
Arguments passed on to
guild_run_clilabelSet a label for the run.
tagAssociate TAG with run. May be used multiple times.
commentComment associated with the run.
run_dirUse alternative run directory DIR. Cannot be used with
stage.stage(bool) Stage an operation.
startStart a staged run or restart an existing run. Cannot be used with
protoorrun_dir.restartStart a staged run or restart an existing run. Cannot be used with
protoorrun_dir.protoUse the operation, flags and source code from RUN. Flags may be added or redefined in this operation. Cannot be used with
restart.force_sourcecode(bool) Use working source code when
restartorprotois specified. Ignored otherwise.gpusLimit availabe GPUs to DEVICES, a comma separated list of device IDs. By default all GPUs are available. Cannot beused with
no_gpus.no_gpus(bool) Disable GPUs for run. Cannot be used with
gpus.batch_labelLabel to use for batch runs. Ignored for non-batch runs.
batch_tagAssociate TAG with batch. Ignored for non-batch runs. May be used multiple times.
batch_commentComment associated with batch.
optimizerOptimize the run using the specified algorithm. See Optimizing Runs for more information.
optimize(bool) Optimize the run using the default optimizer.
minimizeColumn to minimize when running with an optimizer. See help for compare command for details specifying a column. May not be used with
maximize.maximizeColumn to maximize when running with an optimizer. See help for compare command for details specifying a column. May not be used with
minimize.opt_flagFlag for OPTIMIZER. May be used multiple times.
max_trialsMaximum number of trials to run in batch operations. Default is optimizer specific. If optimizer is not specified, default is 20.
trialsMaximum number of trials to run in batch operations. Default is optimizer specific. If optimizer is not specified, default is 20.
stage_trials(bool) For batch operations, stage trials without running them.
remoteRun the operation remotely.
force_flags(bool) Accept all flag assignments, even for undefined or invalid values.
force_deps(bool) Continue even when a required resource is not resolved.
stop_afterStop operation after N minutes.
fail_on_trial_error(bool) Stop batch operations when a trial exits with an error.
needed(bool) Run only if there is not an available matching run. A matching run is of the same operation with the same flag values that is not stopped due to an error.
background(bool) Run operation in background.
pidfileRun operation in background, writing the background process ID to PIDFILE.
no_wait(bool) Don't wait for a remote operation to complete. Ignored if run is local.
save_trialsSaves generated trials to a CSV batch file. See BATCH FILES for more information.
keep_run(bool) Keep run even when configured with 'delete-on-success'.
keep_batch(bool) Keep batch run rather than delete it on success.
depInclude PATH as a dependency.
quiet(bool) Do not show output.
print_cmd(bool) Show operation command and exit.
print_env(bool) Show operation environment and exit.
print_trials(bool) Show generated trials and exit.
help_model(bool) Show model help and exit.
help_op(bool) Show operation help and exit.
test_output_scalarsTest output scalars on output. Use '-' to read from standard intput.
test_sourcecode(bool) Test source code selection.
test_flags(bool) Test flag configuration.
- echo
whether output from the run is shown in the current R console. Note, this has no effect on whether expressions are echoed in the guild run stdout log. To disable echoing of expression in the run logs, specify
#| echo: falsein the run script frontmatter.- as_job
Run the operation as an RStudio background job. This is ignored outside of the RStudio IDE.