Repository: Lightning-AI/pytorch-lightning

Issue:
Learning Rate Schedulers' default dictionary parameters should be set via the Trainer
## 🚀 Feature
The default Learning Rate Schedulers (LRS) dictionary parameters should be settable from the Trainer constructor. 

### Motivation
The documentation doesn't seem to be clear that the LRS have the following additional parameters available to be set when you configure the optimizers: 
```
    'interval': 'epoch',  # default every epoch
    'frequency': 1,  # default every epoch/batch
    'reduce_on_plateau': False,  # most often not ReduceLROnPlateau scheduler
    'monitor': 'val_loss'
```
### Pitch
Set those defaults in the constructor of the Trainer and the user can set them themselves. 

### Alternatives
Force the return type of the function LightningModule.configure_optimizers() to be List[Optimizer], List[Dict]



Discussion:
I disagree mainly due to:
* The trainer constructor already have many arguments, and this would potentially add 3 extra (the `'reduce_on_plateau'` is automatically determined from the LRS) arguments
* The user can already set these in `configure_optimizers` method by passing a LRS as a dict with these keywords.
* If I have two LRS and I want one to step after every epoch and one after every batch i.e. setting `interval="epoch"` for the first and `interval="step"` for the second, I would still need to change at least one of them in `configure_optimizers()` away from the default

I do agree that it is not very clear in the documentation that these are an option to set (this feature was introduced in 0.7.0), this probably needs to be changed 


Resolving patch:
diff --git a/pytorch_lightning/core/lightning.py b/pytorch_lightning/core/lightning.py
--- a/pytorch_lightning/core/lightning.py
+++ b/pytorch_lightning/core/lightning.py
@@ -942,28 +942,27 @@ def configure_optimizers(self):
                     dis_sched = CosineAnnealing(discriminator_opt, T_max=10) # called every epoch
                     return [gen_opt, dis_opt], [gen_sched, dis_sched]
 
-        Some things to know
-
+        .. note:: Some things to note:
             - Lightning calls ``.backward()`` and ``.step()`` on each optimizer
-            and learning rate scheduler as needed.
-
+             and learning rate scheduler as needed.
             - If you use 16-bit precision (``precision=16``), Lightning will automatically
-            handle the optimizers for you.
-
-            - If you use multiple optimizers, training_step will have an additional
-            ``optimizer_idx`` parameter.
-
-            - If you use LBFGS lightning handles the closure function automatically for you
-
+             handle the optimizers for you.
+            - If you use multiple optimizers, training_step will have an additional ``optimizer_idx`` parameter.
+            - If you use LBFGS lightning handles the closure function automatically for you.
             - If you use multiple optimizers, gradients will be calculated only
-            for the parameters of current optimizer at each training step.
-
+             for the parameters of current optimizer at each training step.
             - If you need to control how often those optimizers step or override the
-            default .step() schedule, override the `optimizer_step` hook.
-
+             default .step() schedule, override the `optimizer_step` hook.
             - If you only want to call a learning rate scheduler every `x` step or epoch,
-            you can input this as 'frequency' key: dict(scheduler=lr_scheduler,
-                                                        interval='step' or 'epoch', frequency=x)
+             or want to monitor a custom metric, you can specify these in a dictionary:
+                .. code-block:: python
+
+                    {
+                        'scheduler': lr_scheduler,
+                        'interval': 'step'  # or 'epoch'
+                        'monitor': 'val_f1',
+                        'frequency': x
+                    }
 
         """
         return Adam(self.parameters(), lr=1e-3)


Test patch: