From 1d5fe8afa45942d9455eec275169cd190f3a5cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=BBelasko?= Date: Fri, 21 Jan 2022 17:27:02 -0500 Subject: [PATCH] flake8 --- egs/librispeech/ASR/conformer_ctc/train.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/egs/librispeech/ASR/conformer_ctc/train.py b/egs/librispeech/ASR/conformer_ctc/train.py index ff0c8f9f4..13a546149 100755 --- a/egs/librispeech/ASR/conformer_ctc/train.py +++ b/egs/librispeech/ASR/conformer_ctc/train.py @@ -38,11 +38,11 @@ from torch.utils.tensorboard import SummaryWriter from transformer import Noam from icefall.bpe_graph_compiler import BpeCtcTrainingGraphCompiler -from icefall.graph_compiler import CtcTrainingGraphCompiler from icefall.checkpoint import load_checkpoint from icefall.checkpoint import save_checkpoint as save_checkpoint_impl from icefall.dist import cleanup_dist, setup_dist from icefall.env import get_env_info +from icefall.graph_compiler import CtcTrainingGraphCompiler from icefall.lexicon import Lexicon from icefall.utils import ( AttributeDict, @@ -595,8 +595,9 @@ def run(rank, world_size, args): ) elif "lang_phone" in params.lang_dir: assert params.att_rate == 0, ( - "Attention decoder training does not support phone lang dirs at this time due to a missing " - " symbol. Set --att-rate=0 for pure CTC training when using a phone-based lang dir." + "Attention decoder training does not support phone lang dirs " + "at this time due to a missing symbol. Set --att-rate=0 " + "for pure CTC training when using a phone-based lang dir." ) graph_compiler = CtcTrainingGraphCompiler( lexicon, @@ -608,8 +609,8 @@ def run(rank, world_size, args): graph_compiler.eos_id = 1 else: raise ValueError( - f"Unsupported type of lang dir (we expected it to have 'lang_bpe' or 'lang_phone' " - f"in its name): {params.lang_dir}" + f"Unsupported type of lang dir (we expected it to have " + f"'lang_bpe' or 'lang_phone' in its name): {params.lang_dir}" ) logging.info("About to create model")