Skip to content

Commit 4153506

Browse files
Changed ProgressBar init's type annotation to accept None (#2541)
* Changed ProgressBar init's type annotation to accept None * fixed code formatting * fixed progress bar string formatting Co-authored-by: vfdev <[email protected]>
1 parent 7e05d91 commit 4153506

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ignite/contrib/handlers/tqdm_logger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ class ProgressBar(BaseLogger):
117117
def __init__(
118118
self,
119119
persist: bool = False,
120-
bar_format: str = "{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]",
120+
bar_format: Union[
121+
str, None
122+
] = "{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]",
121123
**tqdm_kwargs: Any,
122124
):
123125

0 commit comments

Comments
 (0)