Parlai: lr scheduler does not reset during fine turning in local model

Created on 2 Jun 2019  路  2Comments  路  Source: facebookresearch/ParlAI

Bug description
When train_model.py is loading model with init-model argument with , lr scheduler seems to continue from the last learning rate recorded, based on model status stored in init-model location, rather than have a hard reset.

Notice that:

  • When bert bi ranker model is first downloaded and loaded via --pretrained-path argument, the issue does NOT persist. Only when model is loaded locally.
  • I am not sure this should be the expected behavior or not, I assume not. Main basis of my assumptions are based on @emilydinan advice at #823 for fine-turn. In addition, @stephenroller 's comment on #1734 indicates that LR scheduler are expected to be reset during fine-turn.

Reproduction steps
Model 1 is first trained locally on convai2 task (with bert bi ranker) and complete training. Later fine turning with --init-model argument point to model 1 path, combine with --model-file argument point to folder does not exist (and expect to create). The LR scheduler does not reset, but rather continue decay based on last learning rate recorded.

Expected behavior
LR scheduler expected to reset to default state based on arguments given at command line inputs.

My silly opinions
In my opinion, it should be expected to perform one of the followings:

  • At command line interface for train_model.py, a new argument should be allow to pass in to control "hard_reset" on lr scheduler, or scheduler do automatically hard reset when --init-model paramter is used.
  • At torch ranker, the "hard_reset" parameter should be controlled or accessed from outside of ranker.

Most helpful comment

Thank you filing the issue @newpro, and especially for writing such a nice clean bug report.

All 2 comments

Thank you filing the issue @newpro, and especially for writing such a nice clean bug report.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelshum picture michaelshum  路  6Comments

Ufukdogann picture Ufukdogann  路  5Comments

Henry-E picture Henry-E  路  5Comments

wanghaoran-ucas picture wanghaoran-ucas  路  4Comments

pcgreat picture pcgreat  路  5Comments