pyt-team / TopoModelX

Topological Deep Learning
https://pyt-team.github.io/topomodelx/
MIT License
227 stars 80 forks source link

Simplicial checks #250

Closed gbg141 closed 11 months ago

gbg141 commented 11 months ago

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

review-notebook-app[bot] commented 11 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team) | Coverage Δ | | |---|---|---| | [topomodelx/nn/simplicial/dist2cycle.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL2Rpc3QyY3ljbGUucHk=) | `100.00% <100.00%> (ø)` | | | [topomodelx/nn/simplicial/dist2cycle\_layer.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL2Rpc3QyY3ljbGVfbGF5ZXIucHk=) | `100.00% <100.00%> (ø)` | | | [topomodelx/nn/simplicial/hsn.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL2hzbi5weQ==) | `100.00% <100.00%> (ø)` | | | [topomodelx/nn/simplicial/san.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL3Nhbi5weQ==) | `96.29% <100.00%> (-0.14%)` | :arrow_down: | | [topomodelx/nn/simplicial/sccn.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL3NjY24ucHk=) | `100.00% <100.00%> (ø)` | | | [topomodelx/nn/simplicial/sccnn.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL3NjY25uLnB5) | `100.00% <100.00%> (+36.06%)` | :arrow_up: | | [topomodelx/nn/simplicial/scn2.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL3NjbjIucHk=) | `100.00% <100.00%> (ø)` | | | [topomodelx/nn/simplicial/scnn.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL3Njbm4ucHk=) | `100.00% <100.00%> (+5.00%)` | :arrow_up: | | [topomodelx/nn/simplicial/scone.py](https://app.codecov.io/gh/pyt-team/TopoModelX/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyt-team#diff-dG9wb21vZGVseC9ubi9zaW1wbGljaWFsL3Njb25lLnB5) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.