Skip to content

Commit 1dfffe5

Browse files
author
Kabir Khan
authored
No output info message in train (#8885)
* Add info message that no output directory was provided in train * Update train.py * Fix logging
1 parent fa2e7a4 commit 1dfffe5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

spacy/cli/train.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ def train_cli(
4343
# Make sure all files and paths exists if they are needed
4444
if not config_path or (str(config_path) != "-" and not config_path.exists()):
4545
msg.fail("Config file not found", config_path, exits=1)
46-
if output_path is not None and not output_path.exists():
47-
output_path.mkdir(parents=True)
48-
msg.good(f"Created output directory: {output_path}")
46+
if not output_path:
47+
msg.info("No output directory provided")
48+
else:
49+
if not output_path.exists():
50+
output_path.mkdir(parents=True)
51+
msg.good(f"Created output directory: {output_path}")
52+
msg.info(f"Saving to output directory: {output_path}")
4953
overrides = parse_config_overrides(ctx.args)
5054
import_code(code_path)
5155
setup_gpu(use_gpu)

0 commit comments

Comments
 (0)