From 41b65fd0f86c82d3e388cfb16c2a8580a839abeb Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Thu, 2 Jul 2020 21:48:01 +0200 Subject: [PATCH] fix to pretrain script (#5699) * fix to pretrain script * remove unnecessary import --- spacy/cli/pretrain.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spacy/cli/pretrain.py b/spacy/cli/pretrain.py index 18c429c60..d0684dcff 100644 --- a/spacy/cli/pretrain.py +++ b/spacy/cli/pretrain.py @@ -15,7 +15,6 @@ from ..ml.models.multi_task import build_masked_language_model from ..tokens import Doc from ..attrs import ID, HEAD from .. import util -from ..gold import Example @app.command("pretrain") @@ -183,7 +182,7 @@ def pretrain( for batch_id, batch in enumerate(batches): docs, count = make_docs( nlp, - [ex.doc for ex in batch], + batch, max_length=pretrain_config["max_length"], min_length=pretrain_config["min_length"], )