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

@register_* decorator in GraphGym #3684

Merged
merged 6 commits into from Dec 11, 2021
Merged

@register_* decorator in GraphGym #3684

merged 6 commits into from Dec 11, 2021

Conversation

rusty1s
Copy link
Member

@rusty1s rusty1s commented Dec 11, 2021

Adds decorator functionality to register GraphGym modules:

@register_layer('linear')
class Linear(torch.nn.Module):
    pass

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2021

Codecov Report

Merging #3684 (351c2fc) into master (cf6bedf) will increase coverage by 0.11%.
The diff coverage is 94.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3684      +/-   ##
==========================================
+ Coverage   81.57%   81.68%   +0.11%     
==========================================
  Files         295      295              
  Lines       14880    14893      +13     
==========================================
+ Hits        12138    12165      +27     
+ Misses       2742     2728      -14     
Impacted Files Coverage Δ
torch_geometric/graphgym/register.py 90.38% <90.38%> (+19.27%) ⬆️
...orch_geometric/graphgym/contrib/train/benchmark.py 21.31% <100.00%> (ø)
torch_geometric/graphgym/model_builder.py 92.85% <100.00%> (-0.48%) ⬇️
torch_geometric/graphgym/models/act.py 100.00% <100.00%> (ø)
torch_geometric/graphgym/models/encoder.py 31.81% <100.00%> (-1.52%) ⬇️
torch_geometric/graphgym/models/gnn.py 80.26% <100.00%> (ø)
torch_geometric/graphgym/models/head.py 50.00% <100.00%> (+1.78%) ⬆️
torch_geometric/graphgym/models/layer.py 73.11% <100.00%> (+1.36%) ⬆️
torch_geometric/graphgym/models/pooling.py 100.00% <100.00%> (+46.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf6bedf...351c2fc. Read the comment docs.

Copy link
Contributor

@JiaxuanYou JiaxuanYou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the implementation a lot cleaner. Thanks!

@rusty1s rusty1s merged commit 5b4ccaf into master Dec 11, 2021
@rusty1s rusty1s deleted the register_module branch December 11, 2021 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants