Skip to content

Commit

Permalink
Changed ProgressBar init's type annotation to accept None (pytorch#2541)
Browse files Browse the repository at this point in the history
* Changed ProgressBar init's type annotation to accept None

* fixed code formatting

* fixed progress bar string formatting

Co-authored-by: vfdev <[email protected]>
  • Loading branch information
Davidportlouis and vfdev-5 authored Apr 12, 2022
1 parent 7e05d91 commit 4153506
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ignite/contrib/handlers/tqdm_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ class ProgressBar(BaseLogger):
def __init__(
self,
persist: bool = False,
bar_format: str = "{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]",
bar_format: Union[
str, None
] = "{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]",
**tqdm_kwargs: Any,
):

Expand Down

0 comments on commit 4153506

Please sign in to comment.