mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 04:40:20 +03:00
Explicitly check for None
when validating progress bar type
This commit is contained in:
parent
68464cf04f
commit
8912a92449
|
@ -107,8 +107,8 @@ def console_logger_v3(
|
|||
write(msg.row(table_header, widths=table_widths, spacing=spacing))
|
||||
write(msg.row(["-" * width for width in table_widths], spacing=spacing))
|
||||
progress = None
|
||||
expected_progress_types = ("train", "eval", None)
|
||||
if progress_bar not in expected_progress_types:
|
||||
expected_progress_types = ("train", "eval")
|
||||
if progress_bar is not None and progress_bar not in expected_progress_types:
|
||||
raise ValueError(
|
||||
Errors.E1048.format(
|
||||
unexpected=progress_bar, expected=expected_progress_types
|
||||
|
|
Loading…
Reference in New Issue
Block a user