t_total
Traceback (most recent call last):
  File "finetune_on_pregenerated.py", line 333, in <module>
    main()
  File "finetune_on_pregenerated.py", line 321, in main
    optimizer.step()
  File "/home/py36/lib/python3.6/site-packages/pytorch_pretrained_bert/optimization.py", line 290, in step
    lr_scheduled *= group['schedule'].get_lr(state['step'])
  File "/home/py36/lib/python3.6/site-packages/pytorch_pretrained_bert/optimization.py", line 61, in get_lr
    progress = float(step) / self.t_total
ZeroDivisionError: float division by zero

Excuse me, what is the cause of this situation, why is t_total equal to 0? ? ?

I found the reason. When the data is relatively small, this happens. After I added the data, it is normal now.