lr_scheduler.OneCycleLR "ValueError: Tried to step X+2 times. The specified number of total steps is X."

Can’t figure it out.
This seems to be related to Number of steps per epoch · Issue #5449 · Lightning-AI/lightning · GitHub
If I remove OneCycleLR and use trainer.auto_lr_find=True then all works fine.