max epochs not reached in multilingual_translation
I am trying to train the model for a certain number of epochs (25), however, it stops at 20, I tried to resume training the model from the last checkpoint, but it wouldn't continue generating the following output: | training on 1 GPUs | max tokens per GPU = 6000 and max sentences per GPU = None | loaded checkpoint \checkpoints\checkpoint_last.pt (epoch 20 @ 4000 updates) | done training in 0.0 seconds
Is there a reason behind that? Does it stop training automatically at a certain loss value?
Could you share your training script? Usually if the minimum learning rate was reached (which depends on the lr-scheduler option) then it stops. --min-lr
python train.py \raw-data\data-bin --task multilingual_translation --criterion label_smoothed_cross_entropy --arch multilingual_transformer --max-epoch 25 --lr 1.0 --wd 0.5 --lang-pairs en-sql,de-sql --encoder-layers 2 --decoder-layers 2 --save-dir \checkpoints --optimizer sgd
you mean I should specify a minimum learning rate?
yes, you can try to set the --min-lr to zero, e.g.
--min-lr 0
but in you case, if the learning rate reaches to such a small value (default mininum lr = 1e-5), then it might be worthless to continue training beyond that point as this LR has little influence on model parameters.
Thanks @frankang! Yes, usually the training stops if you have reached a certain min learning rate or if you have reached a pre-set number of max epochs. Hope this issue has been resolved.