-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Replace torch.nn.ModuleDict
with custom ModuleDict
#5227
Conversation
for more information, see https://pre-commit.ci
…rch_geometric into custom_module_dict
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.
LGTM. Do we know any legacy reasons that .
is not supported?
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! Looks good. Importantly, I don't think we have to replace every occurence of ModuleDict
for now - let's keep it simple and start with HeteroConv
.
@yaoyaowd I believe PyTorch provides nested module access via dot-syntax in |
Tests failure does not seem related to this PR. I will look into this separately. |
@yaoyaowd As per pytorch/pytorch#6639 - seems like |
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.
LGTM after comments are addressed, thanks :)
for more information, see https://pre-commit.ci
…rch_geometric into custom_module_dict
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #5227 +/- ##
==========================================
+ Coverage 83.09% 83.13% +0.03%
==========================================
Files 335 336 +1
Lines 18496 18521 +25
==========================================
+ Hits 15369 15397 +28
+ Misses 3127 3124 -3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
This is amazing. Thank you!
torch.nn.ModuleDict
with CustomModuleDict
torch.nn.ModuleDict
with custom ModuleDict
torch.nn.ModuleDict
doesn't allow.
to be used in the keys. This prevents using node types with.
in the name.CustomModuleDict
will support it by converting the.
to#
in the internal representation and converts it back to.
in the external representation.