From 344a604f1fa485965e4eacf4a767f0a5f201374e Mon Sep 17 00:00:00 2001 From: MogicianXD <1023276135@qq.com> Date: Sat, 13 Apr 2024 12:40:48 +0800 Subject: [PATCH] Revert "Correct online_lr overriding" This reverts commit d27bf3332f8f4a175aa7ba359917b37fc6a4342d. --- qlib/contrib/meta/incremental/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qlib/contrib/meta/incremental/model.py b/qlib/contrib/meta/incremental/model.py index d37b47cd23..37c915b3fc 100644 --- a/qlib/contrib/meta/incremental/model.py +++ b/qlib/contrib/meta/incremental/model.py @@ -235,9 +235,9 @@ def _init_meta_optimizer(self, lr_da=0.01, lr_x=None, lr_y=None, **kwargs): def override_online_lr_(self): if self.online_lr is not None: if 'lr_model' in self.online_lr: - self.framework.opt.param_groups[0]['lr'] = self.online_lr['lr_model'] + self.lr_model = self.online_lr['lr_model'] if 'lr_ma' in self.online_lr: - self.lr_model = self.online_lr['lr_ma'] + self.framework.opt.param_groups[0]['lr'] = self.online_lr['lr_ma'] if 'lr_da' in self.online_lr: self.opt.param_groups[0]['lr'] = self.online_lr['lr_da'] else: