From e920885676c6e7019fdd2891b2173aa630d54c6b Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 2 Sep 2017 12:46:01 -0500 Subject: [PATCH] Fix pickle during train --- spacy/cli/train.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index ddec2c069..b2c87d2b5 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -80,6 +80,7 @@ def train(cmd, lang, output_dir, train_data, dev_data, n_iter=20, n_sents=0, n_train_words = corpus.count_train() optimizer = nlp.begin_training(lambda: corpus.train_tuples, device=use_gpu) + nlp._optimizer = None print("Itn.\tLoss\tUAS\tNER P.\tNER R.\tNER F.\tTag %\tToken %") try: