lightning/tests/base
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
..
__init__.py fix miss-leading imports in tests (#5873) 2021-02-09 05:10:52 -05:00
model_optimizers.py Update LR schedulers only when their corresponding Optimizer is being… (#4868) 2021-05-04 09:37:40 +00:00
model_template.py fixing examples (#6600) 2021-03-20 18:58:59 +00:00
model_test_dataloaders.py Refactor simplify tests (#5861) 2021-02-08 11:52:02 +01:00
model_test_epoch_ends.py Refactor: clean trainer device & distrib getters (#5300) 2021-01-12 05:22:37 -05:00
model_test_steps.py prune deprecated profiler as bool (#6164) 2021-02-24 09:08:21 +00:00
model_train_dataloaders.py Refactor simplify tests (#5861) 2021-02-08 11:52:02 +01:00
model_train_steps.py prune deprecated profiler as bool (#6164) 2021-02-24 09:08:21 +00:00
model_utilities.py Refactor simplify tests (#5861) 2021-02-08 11:52:02 +01:00
model_valid_dataloaders.py Refactor simplify tests (#5861) 2021-02-08 11:52:02 +01:00
model_valid_epoch_ends.py Do not add return dict items to callback_metrics (#6682) 2021-03-26 14:05:20 +01:00
model_valid_steps.py prune deprecated profiler as bool (#6164) 2021-02-24 09:08:21 +00:00