lightning/pytorch_lightning/trainer
Hemil Desai 82c19e1444
Update LR schedulers only when their corresponding Optimizer is being… (#4868)
* Update LR schedulers only when their corresponding Optimizer is being used.

In the case when optimizer frequencies are specified,
the LR scheduler corresponding to a particular optimizer is updated
only when that optimizer is being used in the training loop or epoch.

* pep8speak fixes

* Fix failing tests

* Add docs

* PR Feedback

* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* formatting fix

* PR Feedback - part 2

* More PR feedback

* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* Add typing imports

* Stronger tests and fixes related to that

* Add more tests plus PR feedback

* Make optimizer_freq_cumsum a cached property

@cached_property is only available after Python 3.8 so had to do it manually.

* Fix tests

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* Avoid mutable defaults

* Parametrize lr scheduling tests

* PR feedback

* Apply suggestions from code review

* spell

* Apply suggestions from code review

* flake8

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-04 09:37:40 +00:00
..
connectors Update LR schedulers only when their corresponding Optimizer is being… (#4868) 2021-05-04 09:37:40 +00:00
__init__.py
callback_hook.py [bugfix] Add reloading support using BaseFinetuning (#7253) 2021-04-30 11:14:43 -04:00
configuration_validator.py Code cleaning in preparation for #7258 [3/n] (#7262) 2021-04-29 14:40:51 +02:00
data_loading.py Remove model.trainer call inside of dataloading mixin (#7317) 2021-05-03 13:53:54 -07:00
deprecated_api.py Simplify deprecations (#6620) 2021-03-25 15:26:38 +01:00
evaluation_loop.py Create pytorch_lightning/utilities/types.py (#7048) 2021-04-19 14:43:16 +02:00
ignored_warnings.py
logging.py Move metrics_to_scalars to a dedicated utilities file (#7180) 2021-04-24 10:25:33 +01:00
model_hooks.py
optimizers.py Update LR schedulers only when their corresponding Optimizer is being… (#4868) 2021-05-04 09:37:40 +00:00
predict_loop.py Code cleaning in preparation for #7258 [3/n] (#7262) 2021-04-29 14:40:51 +02:00
properties.py [feat] Add BasePredictionWriter 3/3 (#7127) 2021-04-27 20:23:55 +00:00
states.py Add Trainer.validate(…) method to run one validation epoch (#4948) 2021-03-11 03:46:37 +01:00
supporters.py fix case where an IterableDataset doesn't produce a batch for an epoch (#7294) 2021-04-30 12:45:55 +00:00
trainer.py Update LR schedulers only when their corresponding Optimizer is being… (#4868) 2021-05-04 09:37:40 +00:00
training_loop.py Update LR schedulers only when their corresponding Optimizer is being… (#4868) 2021-05-04 09:37:40 +00:00
training_tricks.py Move NaN/Inf detection to a separate utilities file (#6834) 2021-04-09 01:47:02 +02:00