How to continue training serialized AllenNLP model using `allennlp train`?
Currently training models using AllenNLP 1.2:
allennlp train -f --include-package custom-exp /usr/training_config/mock_model_config.jsonnet -s test-mock-out

The config is very standard:
&quot;dataset_reader&quot; : {

        &quot;reader&quot;: &quot;params&quot;

    },
    &quot;data_loader&quot;: {
        &quot;batch_size&quot;: 3,
        &quot;num_workers&quot;: 1,
    },
    &quot;trainer&quot;: {
        &quot;trainer_params&quot;: &quot;various&quot;
    },


    &quot;vocabulary&quot;: {
        &quot;type&quot;: &quot;from_files&quot;,
        &quot;directory&quot;: vocab_folder,
        &quot;oov_token&quot;: &quot;[UNK]&quot;,
        &quot;padding_token&quot;: &quot;[PAD]&quot;,
    },

    &quot;model&quot;: {
        &quot;various params&quot;: ...
    }

and serializing them to  the test-mock-out directory (also have model.tar.gz).
Using the allennlp train command, is it possible to continue training? The documentation states Model.from_archive should be used, but it's unclear how the config should be adapted to use it.
http://docs.allennlp.org/v1.2.0/api/commands/train/

OK, so to continue the training, one solution is to load the model from_archive.  Assuming you have the serialization directory, make a model.tar.gz archive of the folder. Then, you can make a new config that is identical, except for the model key which uses  from_archive:
retrain_config.json:
{
### Existing params ###
 &quot;data_loader&quot;: {
        &quot;batch_size&quot;: 3,
        &quot;num_workers&quot;: 1,
    },
    &quot;trainer&quot;: {
        &quot;trainer_params&quot;: &quot;various&quot;
    },
### Existing params ###
...
&quot;model&quot;: {
       &quot;type&quot;: &quot;from_archive&quot;,
       &quot;archive_file&quot;: &quot;path/to/my_model.tar.gz&quot;
    }

}


Then, use your original train command, pointing to this new config:
allennlp train -f --include-package custom-exp /usr/training_config/retrain_config.json -s test-mock-out

Note that your vocab and output dimensions/label space should remain consistent. Also, it seems like the global training epochs are not preserved.
Alternatively, if you just want to keep training on the exact same training data, and you just have the serialization directory, then you can avoid having to compress the directory, and just keep adding results to the same directory.
  allennlp train -f --include-package custom-exp /usr/training_config/mock_model_config.jsonnet -s test-mock-out --recover


