-
-
Notifications
You must be signed in to change notification settings - Fork 655
Activate mypy for contrib.handlers #1484
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
Activate mypy for contrib.handlers #1484
Conversation
@gruebel thanks a lot for the PR ! Maybe, it would be more simple to split the PR into multiple ones (simplier reviewing) and either we can try to rework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gruebel I reviewed all files except ignite/contrib/handlers/param_scheduler.py , so let's split this PR into 2: 1 = everything without ignite/contrib/handlers/param_scheduler.py and 2 = only ignite/contrib/handlers/param_scheduler.py
I left a comment to improve a bit tqdm handler. Otherwise, looks good to me.
Sure, no problem. I removed the changes on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gruebel !
Fixes #1406
Description:
That was brutal. Especially the
param_scheduler.py
is such a mess 😄 A lot of the time I had to guess and debug to find out what types are used/returned.Since the private class
torch.optim.lr_scheduler._LRScheduler
has no types defined, I had to addtype: ignore
quite often 😢