From 1dfffe5fb445196d72d6064d340e698f79a49b60 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Thu, 5 Aug 2021 00:21:22 -0700 Subject: [PATCH] No output info message in train (#8885) * Add info message that no output directory was provided in train * Update train.py * Fix logging --- spacy/cli/train.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index 2932edd3b..9fd87dbc1 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -43,9 +43,13 @@ def train_cli( # Make sure all files and paths exists if they are needed if not config_path or (str(config_path) != "-" and not config_path.exists()): msg.fail("Config file not found", config_path, exits=1) - if output_path is not None and not output_path.exists(): - output_path.mkdir(parents=True) - msg.good(f"Created output directory: {output_path}") + if not output_path: + msg.info("No output directory provided") + else: + if not output_path.exists(): + output_path.mkdir(parents=True) + msg.good(f"Created output directory: {output_path}") + msg.info(f"Saving to output directory: {output_path}") overrides = parse_config_overrides(ctx.args) import_code(code_path) setup_gpu(use_gpu)