Access to total number of batches in addition to batch_idx
🚀 Feature

In addition to batch_idx, provide another parameter total_batches for methods and hooks in LightningModule.
Motivation
In LightningModule, even though methods and hooks like training_step and optimizer_step provides batch_idx as an argument, the information about the total number of batches for a epoch is missing. This is not very convenient when the relative progress of a epoch is needed, for example, when implementing features like learning rate warmup, which needs the progress of the first epoch. Other than that, there might be many other scenarios where the total number of batches is useful.

Pitch

def training_step(self, batch, batch_idx, total_batches, optimizer_idx, hiddens):
    ...
Alternatives

One alternative is to pass the length of the DataLoader to the LightningModule before training, but this won't work if the total number of batches is dynamic, say when automatic batch size is enabled or reload_dataloaders_every_epoch flag is turned on.
Additional context