From 3ade455fd35eb14bf59f4d0276c1699323a947a3 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 4 Jun 2020 16:09:55 +0200 Subject: [PATCH] formatting --- spacy/cli/pretrain.py | 7 ++++--- spacy/ml/__init__.py | 2 +- spacy/pipeline/defaults/entity_linker_defaults.cfg | 2 +- spacy/pipeline/defaults/morphologizer_defaults.cfg | 2 +- spacy/pipeline/defaults/textcat_defaults.cfg | 2 +- spacy/pipeline/defaults/tok2vec_defaults.cfg | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/spacy/cli/pretrain.py b/spacy/cli/pretrain.py index 921eb38ab..d37426b5a 100644 --- a/spacy/cli/pretrain.py +++ b/spacy/cli/pretrain.py @@ -26,8 +26,7 @@ from ..gold import Example use_gpu=("Use GPU", "option", "g", int), resume_path=("Path to pretrained weights from which to resume pretraining", "option","r", Path), epoch_resume=("The epoch to resume counting from when using '--resume_path'. Prevents unintended overwriting of existing weight files.","option", "er", int), - -# fmt: on + # fmt: on ) def pretrain( texts_loc, @@ -183,7 +182,9 @@ def pretrain( msg.row(progress, **row_settings) if texts_loc == "-" and tracker.words_per_epoch[epoch] >= 10 ** 7: break - if pretrain_config["n_save_every"] and (batch_id % pretrain_config["n_save_every"] == 0): + if pretrain_config["n_save_every"] and ( + batch_id % pretrain_config["n_save_every"] == 0 + ): _save_model(epoch, is_temp=True) _save_model(epoch) tracker.epoch_loss = 0.0 diff --git a/spacy/ml/__init__.py b/spacy/ml/__init__.py index cf4f59d6c..aed4fa323 100644 --- a/spacy/ml/__init__.py +++ b/spacy/ml/__init__.py @@ -1 +1 @@ -from .models import * \ No newline at end of file +from .models import * diff --git a/spacy/pipeline/defaults/entity_linker_defaults.cfg b/spacy/pipeline/defaults/entity_linker_defaults.cfg index 26a294f37..8dddf9e7b 100644 --- a/spacy/pipeline/defaults/entity_linker_defaults.cfg +++ b/spacy/pipeline/defaults/entity_linker_defaults.cfg @@ -10,4 +10,4 @@ embed_size = 300 window_size = 1 maxout_pieces = 3 subword_features = true -dropout = null \ No newline at end of file +dropout = null diff --git a/spacy/pipeline/defaults/morphologizer_defaults.cfg b/spacy/pipeline/defaults/morphologizer_defaults.cfg index c4452c689..6ee053a08 100644 --- a/spacy/pipeline/defaults/morphologizer_defaults.cfg +++ b/spacy/pipeline/defaults/morphologizer_defaults.cfg @@ -11,4 +11,4 @@ window_size = 1 maxout_pieces = 3 nM = 64 nC = 8 -dropout = null \ No newline at end of file +dropout = null diff --git a/spacy/pipeline/defaults/textcat_defaults.cfg b/spacy/pipeline/defaults/textcat_defaults.cfg index e5817de4a..0981cf77c 100644 --- a/spacy/pipeline/defaults/textcat_defaults.cfg +++ b/spacy/pipeline/defaults/textcat_defaults.cfg @@ -7,4 +7,4 @@ conv_depth = 2 embed_size = 2000 window_size = 1 ngram_size = 1 -dropout = null \ No newline at end of file +dropout = null diff --git a/spacy/pipeline/defaults/tok2vec_defaults.cfg b/spacy/pipeline/defaults/tok2vec_defaults.cfg index 36bf0c3da..d2718eed1 100644 --- a/spacy/pipeline/defaults/tok2vec_defaults.cfg +++ b/spacy/pipeline/defaults/tok2vec_defaults.cfg @@ -7,4 +7,4 @@ embed_size = 2000 window_size = 1 maxout_pieces = 3 subword_features = true -dropout = null \ No newline at end of file +dropout = null