guild diff to compares two runs.
By default, Guild diffs the last two runs. You can specify which runs to diff by specifying the run index or run IDs as arguments.
The following command diffs the last two runs:
This is equivalent to the command:
guild diff 2 1
Arguments are specified as
RUN1 is the first run used in the diff and
RUN2 is the second run. Guild run indexes, as they appear in run lists (e.g. from
guild runs) are listed in descending order sorted by start time. Therefore to compare runs in chronological order, use higher to lower run indexes.
To compare a common path within each run, use
-p. For example, to compare a data file
data.csv generated by both runs, run:
guild compare -p data.csv
You can alternatively compare specific parts of two runs using other options.
||compre run output|
||comprea run source code|
||compare run flags|
For a complete list of options, see
Diff to Working Source Code
--working option to compare run source code to the working project copy.
guild diff --working
Note Guild does not apply
sourcecodefilter rules when diffing with
--working. Guild runs the configured diff program on the specified run’s source code directory (
.guild/sourcecode) to the project source code root. Files that are excluded using filter rules appear in the diff comparison only in the project.
When diffing runs or paths, Guild passes the two run directories (or applicable paths if certain options are included) to a diff program. By default, Guild chooses a diff program available on your system based on its capabilities.
To specify the diff program used, use the
-c option. Guild passes the paths to compare as arguments at the end of the specified command. For example, to use Meld to compare runs, use:
guild compare -c meld
You can configure the diff program that Guild uses by default in user configuration. For more information, see User Config Reference.