Fix serialization during training

This commit is contained in:
Matthew Honnibal 2017-09-21 13:06:45 -05:00
parent 1d73dec8b1
commit 0a9016cade

View File

@ -104,8 +104,8 @@ def train(cmd, lang, output_dir, train_data, dev_data, n_iter=20, n_sents=0,
util.set_env_log(False)
epoch_model_path = output_path / ('model%d' % i)
nlp.to_disk(epoch_model_path)
#nlp_loaded = lang_class(pipeline=pipeline)
#nlp_loaded = nlp_loaded.from_disk(epoch_model_path)
nlp_loaded = lang_class(pipeline=pipeline)
nlp_loaded = nlp_loaded.from_disk(epoch_model_path)
scorer = nlp.evaluate(
corpus.dev_docs(
nlp,