From ae2c208735a9ee033f0eaaae9ea6fa203f30ef68 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 20 Jun 2019 10:36:38 +0200 Subject: [PATCH] Auto-format [ci skip] --- spacy/cli/pretrain.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/spacy/cli/pretrain.py b/spacy/cli/pretrain.py index 7afd10520..2fe5b247a 100644 --- a/spacy/cli/pretrain.py +++ b/spacy/cli/pretrain.py @@ -23,19 +23,39 @@ from .train import _load_pretrained_tok2vec @plac.annotations( - texts_loc=("Path to JSONL file with raw texts to learn from, with text provided as the key 'text' or tokens as the " - "key 'tokens'", "positional", None, str), + texts_loc=( + "Path to JSONL file with raw texts to learn from, with text provided as the key 'text' or tokens as the " + "key 'tokens'", + "positional", + None, + str, + ), vectors_model=("Name or path to spaCy model with vectors to learn from"), output_dir=("Directory to write models to on each epoch", "positional", None, str), width=("Width of CNN layers", "option", "cw", int), depth=("Depth of CNN layers", "option", "cd", int), embed_rows=("Number of embedding rows", "option", "er", int), - loss_func=("Loss function to use for the objective. Either 'L2' or 'cosine'", "option", "L", str), + loss_func=( + "Loss function to use for the objective. Either 'L2' or 'cosine'", + "option", + "L", + str, + ), use_vectors=("Whether to use the static vectors as input features", "flag", "uv"), dropout=("Dropout rate", "option", "d", float), batch_size=("Number of words per training batch", "option", "bs", int), - max_length=("Max words per example. Longer examples are discarded", "option", "xw", int), - min_length=("Min words per example. Shorter examples are discarded", "option", "nw", int), + max_length=( + "Max words per example. Longer examples are discarded", + "option", + "xw", + int, + ), + min_length=( + "Min words per example. Shorter examples are discarded", + "option", + "nw", + int, + ), seed=("Seed for random number generators", "option", "s", int), n_iter=("Number of iterations to pretrain", "option", "i", int), n_save_every=("Save model every X batches.", "option", "se", int),