Is It Possible to Resume Training Via CLI in Spacy v3 (transformers)? #8176
-
I was training a ner model with a config file and train and validation set , I trained for 10 epochs and model-best and model-last got saved and I use those model for inference.
Is there any way I can resume training from 10th epoch and continue on again. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This is possible, but you'll have to change your config slightly. Basically for the next round of training, you don't want to create new components/models, but you want to start from the already trained pipeline. In terms of config values, that means you don't want to use any "factories" anymore, but you'll want to "source" your components instead, see https://spacy.io/usage/processing-pipelines#sourced-components So let's say you were training an
You won't need to specify the If you have multiple components that you want to continue training, you can just "source" all of them. |
Beta Was this translation helpful? Give feedback.
This is possible, but you'll have to change your config slightly. Basically for the next round of training, you don't want to create new components/models, but you want to start from the already trained pipeline. In terms of config values, that means you don't want to use any "factories" anymore, but you'll want to "source" your components instead, see https://spacy.io/usage/processing-pipelines#sourced-components
So let's say you were training an
ner
component and that's saved inmodels/model-last
, then you should be able to do something like this in your config:You won't need to specify the
model
of thisner
component any…