Explicitly check for None when validating progress bar type

This commit is contained in:
shademe 2022-12-23 14:22:03 +01:00
parent 68464cf04f
commit 8912a92449
No known key found for this signature in database
GPG Key ID: 6FCA9FC635B2A402

View File

@ -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