Skip to content
Discussion options

You must be logged in to vote

You need to add an empty configure_optimizers method to your model as there's a bug that disallows leaving it unimplemented. It will be fixed with #11672

The error appears because the lr_scheduler arguments have not been added yet. You can see the order here:

https://github.com/PyTorchLightning/pytorch-lightning/blob/86b177ebe5427725b35fde1a8808a7b59b8a277a/pytorch_lightning/utilities/cli.py#L603-L609

So you have two options:

  1. Delay the linking until we've automatically added the lr scheduler classes
class MyLightningCLI(LightningCLI):
    @staticmethod
    def link_optimizers_and_lr_schedulers(parser):
        # Set lr_scheduler's num_training_steps from datamodule class
        parser.l…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by carmocca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment