[Feature] Support ReduceOnPlateauParamScheduler(#819)
* [Feature] Add ReduceOnPlateauParamScheduler and change ParamSchedulerHook * [Feature] add ReduceOnPlateauLR and ReduceOnPlateauMomentum * pre-commit check * add a little docs * change position * fix the conflict between isort and yapf * fix ParamSchedulerHook after_val_epoch execute without train_loop and param_schedulers built * Apply suggestions from code review Co-authored-by:Mashiro <57566630+HAOCHENYE@users.noreply.github.com> * update ReduceOnPlateauParamScheduler, ReduceOnPlateauMomentum and ParamSchedulerHook * fix get need_step_args attribute error in ParamSchedulerHook * fix load_state_dict error for rule in ReduceOnPlateauParamScheduler * add docs for ParamSchedulerHook and fix a few codes * [Docs] add ReduceOnPlateauParamScheduler, ReduceOnPlateauMomentum and ReduceOnPlateauLR docs * [Refactor] adjust the order of import * [Fix] add init check for threshold in ReduceOnPlateauParamScheduler * [Test] add test for ReduceOnPlateauParamScheduler, ReduceOnPlateauLR and ReduceOnPlateauMomentum * [Fix] fix no attribute self.min_value * [Fix] fix numerical problem in tests * [Fix] fix error in tests * [Fix] fix ignore first param in tests * [Fix] fix bug in tests * [Fix] fix bug in tests * [Fix] fix bug in tests * [Fix] increase coverage * [Fix] fix count self._global_step bug and docs * [Fix] fix tests * [Fix] modified ParamSchedulerHook test * Update mmengine/optim/scheduler/param_scheduler.py Co-authored-by:
Mashiro <57566630+HAOCHENYE@users.noreply.github.com> * Apply suggestions from code review Co-authored-by:
Mashiro <57566630+HAOCHENYE@users.noreply.github.com> * [Fix] modified something according to commented * [Docs] add api for en and zh_cn * [Fix] fix bug in test_param_scheduler_hook.py * [Test] support more complicated test modes(less, greater, rel, abs) for ReduceOnPlateauParamScheduler * [Docs] add docs for rule * [Fix] fix pop from empty list bug in test * [Fix] fix check param_schedulers is not built bug * [Fix] fix step_args bug and without runner._train_loop bug * [Fix] fix step_args bug and without runner._train_loop bug * [Fix] fix scheduler type bug * [Test] rename step_args to step_kwargs * [Fix] remove redundancy check * [Test] remove redundancy check * Apply suggestions from code review Co-authored-by:
Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> * [Test] fix some defects Co-authored-by:
Mashiro <57566630+HAOCHENYE@users.noreply.github.com> Co-authored-by:
Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Showing
- docs/en/api/optim.rst 3 additions, 0 deletionsdocs/en/api/optim.rst
- docs/zh_cn/api/optim.rst 3 additions, 0 deletionsdocs/zh_cn/api/optim.rst
- mmengine/hooks/param_scheduler_hook.py 54 additions, 6 deletionsmmengine/hooks/param_scheduler_hook.py
- mmengine/optim/__init__.py 6 additions, 3 deletionsmmengine/optim/__init__.py
- mmengine/optim/scheduler/__init__.py 8 additions, 6 deletionsmmengine/optim/scheduler/__init__.py
- mmengine/optim/scheduler/lr_scheduler.py 63 additions, 1 deletionmmengine/optim/scheduler/lr_scheduler.py
- mmengine/optim/scheduler/momentum_scheduler.py 80 additions, 2 deletionsmmengine/optim/scheduler/momentum_scheduler.py
- mmengine/optim/scheduler/param_scheduler.py 277 additions, 2 deletionsmmengine/optim/scheduler/param_scheduler.py
- tests/test_hooks/test_param_scheduler_hook.py 53 additions, 3 deletionstests/test_hooks/test_param_scheduler_hook.py
- tests/test_optim/test_scheduler/test_lr_scheduler.py 211 additions, 6 deletionstests/test_optim/test_scheduler/test_lr_scheduler.py
- tests/test_optim/test_scheduler/test_momentum_scheduler.py 241 additions, 6 deletionstests/test_optim/test_scheduler/test_momentum_scheduler.py
- tests/test_optim/test_scheduler/test_param_scheduler.py 224 additions, 7 deletionstests/test_optim/test_scheduler/test_param_scheduler.py
Loading
Please register or sign in to comment