Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar format is str but should be Optional[str] in ignite.contrib.handlers.tqdm_logger.ProgressBar #2540

Closed
yohan-pg opened this issue Apr 5, 2022 · 3 comments · Fixed by #2541

Comments

@yohan-pg
Copy link

yohan-pg commented Apr 5, 2022

🐛 Bug description

ignite.contrib.handlers.tqdm_logger.ProgressBar can accept None in the bar_format initialization argument (as documented), but this is not reflected in the type annotation.

bar_format: str = "{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]",

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 5, 2022

Thanks for catching that @yohan-pg , would you like to send a fix ?
So, it should be

bar_format: Union[str, None] = "{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]"

@Davidportlouis
Copy link
Contributor

Davidportlouis commented Apr 6, 2022

@vfdev-5 I would like to work on this fix

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 6, 2022

Thanks @Davidportlouis , assigned it to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants