Skip to content

lr_scheduler.step() doesn't run on every epoch on "epoch" mode. #7737

@ghost

Description

Hi, there:
  I am using PyTorch lightning now. I appreciate you guys supporting a more elegant way to use PyTorch.
  The question is that the lr_scheduler.step() is not called on every epoch even I set the interval as "epoch" and frequency as "1". The .step() will be called every 10 epochs if I set check_val_every_n_epoch to 10 for example. By tracing the log and debug your source code, I found that .step() was only called after the validation step was called if I assigned the validation step and params. But I want to run .step() on every single epoch, not just the epoch that the validation step running. Considering the running of validation step as a condition of running LR scheduler step() seems too strictly.
  Can you guys support running the LR scheduler step() every epoch no matter what the validation interval is? Or there is already a satisfying way that I missed? The pytorch lightning version is 1.3.1.
Thanks.

Metadata

Metadata

Assignees

Labels

help wantedOpen to be worked onquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions