run command

  1. Usage
    1. Re-running operations
    2. Restarting operations
    3. Alternate run directory
    4. Controlling visible GPU devices
  2. Options

Usage

guild run [OPTIONS] [[MODEL:]OPERATION] [FLAG=VAL...]

Run a model operation.

By default Guild will try to run OPERATION for the default model defined in a project. If a project location is not specified (see ‑‑project option below), Guild looks for a project in the current directory.

If MODEL is specified, Guild will use it instead of the default model defined in a project.

[MODEL]:OPERATION may be omitted if ‑‑rerun is specified, in which case the operation used in RUN will be used.

Specify FLAG values in the form FLAG=VAL.

Re-running operations

If ‑‑rerun is specified, the operation and flags used in RUN will be applied to the new operation. You may add or redefine flags in the new operation. You may also use an alternative operation, in which case only the flag values from RUN will be applied. RUN must be a run ID or unique run ID prefix or the special value 0, which indicates the latest run.

Restarting operations

If ‑‑restart is specified, the specified RUN is restarted in-place using its operation and flags. Unlike rerun, restart does not create a new run, but instead reuses the run directory of RUN. Like a rerun, a restart may specify a different operation and additional flags and may use 0 for the value of RUN to restart the latest run. ‑‑run‑dir may not be used with ‑‑restart.

‑‑rerun and ‑‑restart may not both be used.

Alternate run directory

To run an operation outside of Guild's run management facility, use ‑‑run‑dir or ‑‑stage to specify an alternative run directory. These options are useful when developing or debugging an operation. Use ‑‑stage to prepare a run directory for an operation without running the operation itself. This is useful when you want to verify dependency resolution and pre-processing or manually run an operation in a prepared directory.

NOTE: Runs started with ‑‑run‑dir are not visible to Guild and will not appear in run listings.

Controlling visible GPU devices

By default, operations have access to all available GPU devices. To limit the GPU devices available to a run, use ‑‑gpus.

For example, to limit visible GPU devices to 0 and 1, run:

guild run ‑‑gpus 0,1 ...

To disable all available GPUs, use ‑‑no‑gpus.

NOTE: ‑‑gpus and ‑‑no‑gpus are used to construct the CUDA_VISIBLE_DEVICES environment variable used for the run process. If CUDA_VISIBLE_DEVICES is set, using either of these options will cause it to be redefined for the run.

Options

-l, --label LABEL

Set a label for the run.

-d, --run-dir DIR

Use alternative run directory DIR. Cannot be used with --stage.

--stage DIR

Stage an operation in DIR but do not run. Cannot be used with --run-dir.

--rerun RUN

Use the operation and flags from RUN. Flags may be added or redefined in this operation. Cannot be used with --restart.

-r, --remote REMOTE

Run the operation remotely.

--restart RUN

Restart RUN in-place without creating a new run. Cannot be used with --rerun or --run-dir.

--disable-plugins LIST

A comma separated list of plugin names to disable. Use 'all' to disable all plugins.

--gpus DEVICES

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

Disable GPUs for run. Cannot be used with --gpu.

-y, --yes

Do not prompt before running operation.

--background PIDFILE

Run operation in background. PIDFILE must be a path to a file where the background process ID is written.

-n, --no-wait

Don't wait for a remote operation to complete. Ignored if run is local.

--set-trace

Enter the Python debugger at the operation entry point.

-q, --quiet

Do not show output.

--print-cmd

Show operation command and exit.

--print-env

Show operation environment and exit.

--help-model

Show model help and exit.

--help-op

Show operation help and exit.

--help Show command help and exit.
Guild AI version 0.5.1