Same problem here.First several epochs are OK, but then at some point this bug will show up - also with 2 more steps:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-31-72b05a339c71> in <module>
      2 train_loop(
      3     manager, settings, model, device,
----> 4     train_loader, optimizer, scheduler, loss_func)

<ipython-input-22-8964fda4c572> in train_loop(manager, args, model, device, train_loader, optimizer, scheduler, loss_func)
     15                 loss.backward()
     16                 optimizer.step()
---> 17                 scheduler.step()
     18 
     19 def eval_for_batch(

/opt/conda/lib/python3.7/site-packages/torch/optim/lr_scheduler.py in step(self, epoch)
    139             if epoch is None:
    140                 self.last_epoch += 1
--> 141                 values = self.get_lr()
    142             else:
    143                 warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning)

/opt/conda/lib/python3.7/site-packages/torch/optim/lr_scheduler.py in get_lr(self)
   1211         if step_num > self.total_steps:
   1212             raise ValueError("Tried to step {} times. The specified number of total steps is {}"
-> 1213                              .format(step_num + 1, self.total_steps))
   1214 
   1215         for group in self.optimizer.param_groups:

ValueError: Tried to step 2102 times. The specified number of total steps is 2100

Each epoch contains 42 iterations, no exception. I’ve write my settings as below:
loader:
  train:
    batch_size: 50
    shuffle: True
    num_workers: 2
    pin_memory: True
    drop_last: True
  val:
    batch_size: 100
    shuffle: False
    num_workers: 2
    pin_memory: True
    drop_last: False

scheduler:
  name: OneCycleLR
  params:
    max_lr: 0.01
    steps_per_epoch: 42
    epochs: 50

And below is my training loop:
def train_loop(
    manager, args, model, device,
    train_loader, optimizer, scheduler, loss_func
):
    """Run minibatch training loop"""
    while not manager.stop_trigger:
        model.train()
        for batch_idx, (data, target) in enumerate(train_loader):
            with manager.run_iteration():
                data, target = data.to(device), target.to(device)
                optimizer.zero_grad()
                output = model(data)
                loss = loss_func(output, target)
                ppe.reporting.report({'train/loss': loss.item()})
                loss.backward()
                optimizer.step()
                scheduler.step()

After all during the 50 epochs a ValueError such like this could occur and interupt training. Don’t know how to solve this problem since if the steps are too less then it should be 2150, 2200 or 2250 etc, why 2102? Really can’t understand…