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

Simplicial checks #250

Merged
merged 14 commits into from
Nov 9, 2023
Merged

Simplicial checks #250

merged 14 commits into from
Nov 9, 2023

Conversation

gbg141
Copy link
Member

@gbg141 gbg141 commented Nov 7, 2023

This PR introduces some modifications in simplicial models to ensure a consistent implementation across all of them (with the exceptions of SCA_CMPS and SCConv, that need further analysis).

In particular, we decoupled the readout from the models, thus making a uniform implementation of the simplicial architectures for whichever dowstream task is considered. The output of each model is now the set of final hidden representations of the involved simplices (nodes, edgees, faces,... or a combination of them), and then a light Network class is defined in the tutorials to leverage the final hidden states to get the desired output for the considered dataset and task.

Apart from this refactorization of the implementations, which could facilitate the aplication/adaptation of the models to different domains and tasks, we have also checked the model pipelines, as well as updated the involved test files accordingly (except with SCA_CMPS and SCConv, which require a closer look).

@gbg141 gbg141 linked an issue Nov 7, 2023 that may be closed by this pull request
10 tasks
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 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2aaf18c) 96.54% compared to head (642bdbf) 97.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
+ Coverage   96.54%   97.49%   +0.94%     
==========================================
  Files          58       58              
  Lines        2229     2155      -74     
==========================================
- Hits         2152     2101      -51     
+ Misses         77       54      -23     
Files Coverage Δ
topomodelx/nn/simplicial/dist2cycle.py 100.00% <100.00%> (ø)
topomodelx/nn/simplicial/dist2cycle_layer.py 100.00% <100.00%> (ø)
topomodelx/nn/simplicial/hsn.py 100.00% <100.00%> (ø)
topomodelx/nn/simplicial/san.py 96.29% <100.00%> (-0.14%) ⬇️
topomodelx/nn/simplicial/sccn.py 100.00% <100.00%> (ø)
topomodelx/nn/simplicial/sccnn.py 100.00% <100.00%> (+36.06%) ⬆️
topomodelx/nn/simplicial/scn2.py 100.00% <100.00%> (ø)
topomodelx/nn/simplicial/scnn.py 100.00% <100.00%> (+5.00%) ⬆️
topomodelx/nn/simplicial/scone.py 100.00% <100.00%> (ø)

☔ 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.

LGTM! Just one comment: is there a reason to have a file path data/cora/Cora/raw?

  • there is no uppercase in python, thus it should be at least data/cora/cora/raw
  • however, the most straightforward is: data/cora

Are you using this complicated path for consistency with how this dataset is refered to in other packages?

In any case, I'm merging this PR now (so that we avoid github conflicts), but if it makes sense to update the file path to data/cora, could you do it in a follow-up PR? Thanks!

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.

Review nn/simplicial models
3 participants