Pytorch Training Time Estimator

Good day, I would like to know if there is a way to write code that can measure one epoch or from the second one onwards to perhaps predict the time it would take to train a whole model. For instance, the code must be able to determine if a training model is going to take an hour, 6 hours, 10 days, and so on?

Take a look at the famous tqdm module.
It would work to satisfy your requirements.

You can use as follows:

for index, data in enumerate(tqdm(dataloader)):

It will create a progress bar and show the remaining time.

Thank you @InnovArul