Learning rate interval update not working properly
🐛 Bug
When I use Onecycle scheduler, it only works properly if I set steps_per_epoch = 1, even though I have set 'interval': 'step'.
scheduler = torch.optim.lr_scheduler.OneCycleLR(optimizer,
                                                            max_lr,
                                                            epochs,
                                                            steps_per_epoch = len(self.loaders_dict['train']))

return {"optimizer": optimizer, "lr_scheduler": scheduler, "monitor": "train_loss", 'interval': 'step'}

Here is the learning rate at the end of training if I set steps_per_epoch > 1

I went to check the code:
Here is the training loop
There seems to be two main functions that update the learning rate:
here
self.update_train_loop_lr_schedulers(monitor_metrics=monitor_metrics)
that later calls:
self.trainer.optimizer_connector.update_learning_rates(interval="step", monitor_metrics=monitor_metrics)
and
here
self.trainer.optimizer_connector.update_learning_rates(interval='epoch')
I cant figure out what exactly is wrong, any help will be appreciated. Thanks!

PyTorch Version 1.7
Linux