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

Check hypergraphs #256

Merged
merged 26 commits into from
Mar 20, 2024
Merged

Check hypergraphs #256

merged 26 commits into from
Mar 20, 2024

Conversation

Coerulatus
Copy link
Collaborator

#247
Changed the hypergraph models to use the Conv class defined in this library. Due to how the attention is calculated it was not always feasible to use the Conv operation. Hypergat and hypersage still use their costume convolution functions.

Coerulatus and others added 21 commits November 8, 2023 15:22
…gin layer for consistency with official implementation
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.36%. Comparing base (27e97ea) to head (c95265f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
+ Coverage   97.07%   97.36%   +0.29%     
==========================================
  Files          58       58              
  Lines        2014     2050      +36     
==========================================
+ Hits         1955     1996      +41     
+ Misses         59       54       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ninamiolane ninamiolane left a comment

Choose a reason for hiding this comment

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

Very nice! One super minor comment about coding style (see PEP8 and the standards on naming functions: https://peps.python.org/pep-0008/.

Once this is fixed, we can merge. Congrats on this fantastic contribution (and sorry for the delay in reviewing).

@@ -15,7 +15,13 @@ def UniGIN_layer(self):
self.in_channels = 10
return UniGINLayer(in_channels=self.in_channels)

def test_forward(self, UniGIN_layer):
@pytest.fixture
def UniGIN_layer2(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Avoid mix of under_scores and CamelCase in names.
Python guidelines ask for all lower cases and under_scores in function names, see Pep8. Can you adapt the naming of this function and the others which may have the same problem? Thanks.

self.in_channels = 10
return UniGINLayer(in_channels=self.in_channels, use_norm=True)

def test_forward(self, UniGIN_layer, UniGIN_layer2):
Copy link
Collaborator

Choose a reason for hiding this comment

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

No mix of under_scores and CamelCase.
If you're passing a class --> CamelCase
If you're passing an object or a function --> underscores.
See pep8 guidelines for international standards in code style.

@@ -42,6 +45,7 @@ def __init__(
)
)
self.layers = torch.nn.ModuleList(layers)
self.layer_drop = torch.nn.Dropout(layer_drop)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -51,6 +51,8 @@ class HyperSAGELayer(MessagePassing):
Dimension of the input features.
out_channels : int
Dimension of the output features.
alpha: int, default=-1
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: there is a space before the ":" in numpy's docstring conventions (which are the ones we use in the library) for some reason.

@Coerulatus
Copy link
Collaborator Author

Thank you for the feedback! I resolved the mentioned issues

@Coerulatus
Copy link
Collaborator Author

Hello,
I noticed that the pull request has not been accepted yet, and I was wondering if there might be any issues or concerns that need to be addressed.
Thank you very much for your time and consideration.

@ffl096
Copy link
Member

ffl096 commented Mar 5, 2024

This pull request has conflicts with the main branch that must be resolved before merging. Please rebase or merge the current main branch and resolve these conflicts :)

@Coerulatus
Copy link
Collaborator Author

@ffl096 Hi Florian, I have resolved the conflicts. Let me know if there is anything else! Thank you very much.

@ffl096 ffl096 merged commit 8ea75a7 into main Mar 20, 2024
24 checks passed
@ffl096 ffl096 deleted the add_conv branch March 20, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants