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_cli
label
Set a label for the run.
tag
Associate TAG with run. May be used multiple times.
comment
Comment associated with the run.
run_dir
Use alternative run directory DIR. Cannot be used with
stage
.stage
(bool) Stage an operation.
start
Start a staged run or restart an existing run. Cannot be used with
proto
orrun_dir
.restart
Start a staged run or restart an existing run. Cannot be used with
proto
orrun_dir
.proto
Use 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
restart
orproto
is specified. Ignored otherwise.gpus
Limit 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_label
Label to use for batch runs. Ignored for non-batch runs.
batch_tag
Associate TAG with batch. Ignored for non-batch runs. May be used multiple times.
batch_comment
Comment associated with batch.
optimizer
Optimize the run using the specified algorithm. See Optimizing Runs for more information.
optimize
(bool) Optimize the run using the default optimizer.
minimize
Column to minimize when running with an optimizer. See help for compare command for details specifying a column. May not be used with
maximize
.maximize
Column to maximize when running with an optimizer. See help for compare command for details specifying a column. May not be used with
minimize
.opt_flag
Flag for OPTIMIZER. May be used multiple times.
max_trials
Maximum number of trials to run in batch operations. Default is optimizer specific. If optimizer is not specified, default is 20.
trials
Maximum 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.
remote
Run 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_after
Stop 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.
pidfile
Run 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_trials
Saves 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.
dep
Include 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_scalars
Test 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: false
in the run script frontmatter.- as_job
Run the operation as an RStudio background job. This is ignored outside of the RStudio IDE.