OneCycleLR Why specfiy number of steps

Hi,

I do not understand why for the OneCycle LR scheduler I need to specify the number of epochs or the total number of steps. I was under the impression that the OneCycle scheduler cycles through the learning rate and momentum, per batch within a epoch but is reset for each new epoch.

How would I set up the scheduler if I do not know the number of epochs because I am using Early Stopping.