-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Closed
Labels
module: LrSchedulermodule: optimizerRelated to torch.optimRelated to torch.optimtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
📚 The doc issue
The purpose of print_lr
is unclear, and arguments are undocumented.
Also, the API is counter-intuitive. For example, in python API, we do not use print('hello', verbose=False)
to not print something, and here the verbose
is even a required argument. Instead, the user should put an if condition before calling the print function.
Related thread: https://discuss.pytorch.org/t/how-to-use-print-lr-in-the-lr-scheduler/132420
Source: https://github.com/pytorch/pytorch/blob/master/torch/optim/lr_scheduler.py#L113-L124
Suggest a potential alternative/fix
I suggest removing that function since users can still simply get the current LR via get_last_lr
and design the printing message on their own.
Metadata
Metadata
Assignees
Labels
module: LrSchedulermodule: optimizerRelated to torch.optimRelated to torch.optimtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module