mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-02 03:59:31 +02:00
to [#50529030] fix easycv lr hook error
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/13069804
This commit is contained in:
@@ -112,6 +112,9 @@ class LrSchedulerHook(Hook):
|
||||
self.processor.step(trainer)
|
||||
|
||||
def _get_log_lr(self, trainer):
|
||||
# forward compatibility with AddLrLogHook in EasyCV
|
||||
if not hasattr(self, 'processor'):
|
||||
self.processor = LrSchedulerProcessor()
|
||||
cur_lr = self.processor.get_current_lr(trainer)
|
||||
# only record lr of the first param group
|
||||
if isinstance(cur_lr, list):
|
||||
|
||||
Reference in New Issue
Block a user