Skip to content

Conversation

@suo
Copy link
Member

@suo suo commented Sep 23, 2019

Stack from ghstack:

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

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.
@suo suo requested a review from apaszke as a code owner September 23, 2019 20:55
@pytorchbot pytorchbot added oncall: jit Add this issue/PR to JIT oncall triage queue module: pybind Related to our Python bindings / interactions with other Python libraries labels Sep 23, 2019
@suo suo mentioned this pull request Sep 23, 2019
9 tasks
Copy link
Contributor

@resistor resistor left a 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.
@eellison
Copy link
Contributor

I think this might have a bad interaction with the is None check partial compilation

@suo
Copy link
Member Author

suo commented Sep 24, 2019

I think this might have a bad interaction with the is None check partial compilation

Can you elaborate?

@eellison
Copy link
Contributor

I think this might have a bad interaction with the is None check partial compilation

Can you elaborate?

Anytime there's a None attribute you can reasonably assume this is an Optional attribute. Bc of the partial compilation of if statements with is None checks, the optional behavior will get compiled away here if we infer None. This is valid for constants, but i'm not sure about generally assuming this to be true.

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)
suo added a commit that referenced this pull request Sep 25, 2019
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.

ghstack-source-id: 48b774f
Pull Request resolved: #26665
suo added 4 commits September 26, 2019 15:51
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)
@pytorchbot pytorchbot added caffe2 module: cpp Related to C++ API module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: operators labels Oct 2, 2019
suo added 2 commits October 2, 2019 14:22
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)
@suo suo mentioned this pull request Oct 4, 2019
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 was referenced Oct 4, 2019
suo added 6 commits October 6, 2019 01:11
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)
@suo suo requested a review from zdevito October 11, 2019 17:50
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)
@facebook-github-bot
Copy link
Contributor

@suo merged this pull request in 759c99c.

@facebook-github-bot facebook-github-bot deleted the gh/suo/173/head branch October 28, 2019 22:20
thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

caffe2 Merged module: cpp Related to C++ API module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: pybind Related to our Python bindings / interactions with other Python libraries oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants