mirror of https://github.com/explosion/spaCy.git
fix to pretrain script (#5699)
* fix to pretrain script * remove unnecessary import
This commit is contained in:
parent
a723fa02a1
commit
41b65fd0f8
|
@ -15,7 +15,6 @@ from ..ml.models.multi_task import build_masked_language_model
|
||||||
from ..tokens import Doc
|
from ..tokens import Doc
|
||||||
from ..attrs import ID, HEAD
|
from ..attrs import ID, HEAD
|
||||||
from .. import util
|
from .. import util
|
||||||
from ..gold import Example
|
|
||||||
|
|
||||||
|
|
||||||
@app.command("pretrain")
|
@app.command("pretrain")
|
||||||
|
@ -183,7 +182,7 @@ def pretrain(
|
||||||
for batch_id, batch in enumerate(batches):
|
for batch_id, batch in enumerate(batches):
|
||||||
docs, count = make_docs(
|
docs, count = make_docs(
|
||||||
nlp,
|
nlp,
|
||||||
[ex.doc for ex in batch],
|
batch,
|
||||||
max_length=pretrain_config["max_length"],
|
max_length=pretrain_config["max_length"],
|
||||||
min_length=pretrain_config["min_length"],
|
min_length=pretrain_config["min_length"],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue