Shared flags for a subset of operations

Use includes, like this:

- config: shared-attrs
  flags:
    foo: 123
    bar: abc

- operations:
    train-1:
      flags:
        $include: shared-attrs
    train-2:
      flags:
        $include: shared-attrs
        bam: xyz

Note that this uses Guild’s full format for guild.yml. The structure becomes a list (rather than “operation only” which is a dict/map). A config section is just a place to hold config that other parts of the file can reference. It doesn’t impact your model defs. The second section has an implicit model: '' attr, which is the anonymous model. This is what you get with “operation only” format, implicitly.

1 Like