flair icon indicating copy to clipboard operation
flair copied to clipboard

Error resuming training of a NER model

Open fmafelipe opened this issue 1 year ago • 4 comments

I want to resume training a NER model as shown in the tutorials, loading the model checkpoint but running it with :

trainer.resume(trained_model, base_path=path + '-resume', max_epochs=25, )

It simply shows me the metrics of the loaded model and does not perform any training.

fmafelipe avatar Aug 04 '22 22:08 fmafelipe

hi @fmafelipe , setting max_epochs=25 means that the model will be trained for a total of 25 epochs, not for additional 25 epochs. if you have already trained the model for 25 epochs, then the model will be trained for 0 epochs (e.g. not at all).

helpmefindaname avatar Aug 07 '22 16:08 helpmefindaname

Hi @helpmefindaname So following this example, if I want to train the model for an additional 25 epochs, do I need to set max_epochs=50 ? Thanks for the help

fmafelipe avatar Aug 10 '22 22:08 fmafelipe

assuming that you trained for 25 epochs, yes.

If you are using the latest master branch, (where https://github.com/flairNLP/flair/pull/2895 is merged) you can also use additional_epochs=25 instead.

helpmefindaname avatar Aug 10 '22 22:08 helpmefindaname

Thank you so much 👍👌

fmafelipe avatar Aug 10 '22 22:08 fmafelipe

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 24 '22 06:12 stale[bot]