Guild.ai x Lightning CLI

@Alessandro, thanks for the sample repository. It helped me a lot.

If it helps anyone, below I show how I could complement it with a dependency use case.

I tried to run a validation op with the training op as a requirement, but I kept getting argparse.ArgumentError: Validation failed: No action for key "operation:facornet:train" to check its value..

My guild config was

        - operation: facornet:train
          select: exp/checkpoints/.*\.(\d+)\.ckpt
          rename: exp/checkpoints/best.ckpt

At last, I solved it by subclassing LightningCLI, as below

class MyLightningCLI(LightningCLI):
    def add_arguments_to_parser(self, parser):
        # Add any custom arguments
        parser.add_argument("--operation:facornet:train", default=None)
        return parser

def main(args=None):
    MyLightningCLI(args=args, subclass_mode_model=True)

What I couldn’t do was use select-max, but I am OK with that for now.