-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[jit Python None should have its type inferred as NoneType #26665
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
Conversation
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not.
resistor
left a comment
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.
Change LGTM, but testcase plz.
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not.
|
I think this might have a bad interaction with the |
Can you elaborate? |
Anytime there's a |
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Differential Revision: [D17551197](https://our.internmc.facebook.com/intern/diff/D17551197)
…6665) Summary: Pull Request resolved: pytorch#26665 This is actually useful. For example: in batchnorm.py, all the tracked stats are either `nn.Parameter` or `None`. We should register them as params if they are set, or attributes with type NoneType if they are not. Test Plan: Imported from OSS Reviewed By: shannonzhu Differential Revision: D17551197 Pulled By: suo fbshipit-source-id: 8d6f6d76d4dab0d524c4ffdfe0c1dd465771cd00
Stack from ghstack:
This is actually useful. For example: in batchnorm.py, all the tracked
stats are either
nn.ParameterorNone. We should register them asparams if they are set, or attributes with type NoneType if they are
not.
Differential Revision: D17551197