question: multiple on_train_epoch_start callbacks but only one on_train_epoch_end?
context: I thought the number of on_train_epoch_start and on_train_epoch_end should be equal to the number of epochs. But when I passed the following callback function:
  class MyPrintingCallback(Callback):
  
      def on_train_epoch_start(self, trainer, pl_module):
          print('Train epoch start for epoch: ', pl_module.current_epoch)
          
      def on_train_epoch_end(self, trainer, pl_module):
          # will run only once in the beginning
          print('Train step end for epoch: ', pl_module.current_epoch)
  
  on_train_epoch_end is only called in the 0th epoch:
  
  Training: -1it [00:00, ?it/s]Train epoch start for epoch:  0
  Epoch 0: : 4875it [00:33, 143.57it/s, Train step end for epoch:  0
  Train epoch start for epoch:  1
  Epoch 1: : 0it [00:00, 7096.96it/s, loss=2.13e+09, v_num=37] Train epoch start for epoch:  2
  Epoch 2: : 0it [00:00, 11335.96it/s, loss=2.13e+09, v_num=37]Train epoch start for epoch:  3
  Epoch 3: : 0it [00:00, 12052.60it/s, loss=2.13e+09, v_num=37]Train epoch start for epoch:  4
  Epoch 4: : 0it [00:00, 4301.85it/s, loss=2.13e+09, v_num=37]
  
  Any idea why this is happening?
answer: It turns out that the issue is because I was chaining many data loaders with itertools.chain() which was called only once by lightning.