Skip to content

Commit

Permalink
Revert "Correct online_lr overriding"
Browse files Browse the repository at this point in the history
This reverts commit d27bf33.
  • Loading branch information
MogicianXD committed Apr 13, 2024
1 parent d27bf33 commit 344a604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qlib/contrib/meta/incremental/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 344a604

Please sign in to comment.