Skip to content

Commit

Permalink
Merge branch 'main' into feat-mantra
Browse files Browse the repository at this point in the history
  • Loading branch information
gbg141 committed Dec 17, 2024
2 parents 2aa3de1 + 48f9fcf commit b8c03bc
Show file tree
Hide file tree
Showing 48 changed files with 173 additions and 171 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
with:
src: './topobenchmarkx'
src: './topobenchmark'
3 changes: 2 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ coverage:
round: down
precision: 2
ignore:
- "test/"
- "test/"
- "topobenchmark/run.py"
2 changes: 1 addition & 1 deletion configs/dataset/graph/AQSOL.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.MoleculeDatasetLoader
_target_: topobenchmark.data.loaders.MoleculeDatasetLoader
parameters:
data_domain: graph
data_type: AQSOL
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/IMDB-MULTI.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.TUDatasetLoader
_target_: topobenchmark.data.loaders.TUDatasetLoader
parameters:
data_domain: graph
data_type: TUDataset
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/NCI1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loader:
_target_: topobenchmarkx.data.loaders.TUDatasetLoader
_target_: topobenchmark.data.loaders.TUDatasetLoader
parameters:
data_domain: graph
data_type: TUDataset
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/PROTEINS.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.TUDatasetLoader
_target_: topobenchmark.data.loaders.TUDatasetLoader
parameters:
data_domain: graph
data_type: TUDataset
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/cocitation_citeseer.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.PlanetoidDatasetLoader
_target_: topobenchmark.data.loaders.PlanetoidDatasetLoader
parameters:
data_domain: graph
data_type: cocitation
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/tolokers.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.HeterophilousGraphDatasetLoader
_target_: topobenchmark.data.loaders.HeterophilousGraphDatasetLoader
parameters:
data_domain: graph
data_type: heterophilic
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/hypergraph/coauthorship_cora.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.CitationHypergraphDatasetLoader
_target_: topobenchmark.data.loaders.CitationHypergraphDatasetLoader
parameters:
data_domain: hypergraph
data_type: coauthorship
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/hypergraph/cocitation_pubmed.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataset loader config
loader:
_target_: topobenchmarkx.data.loaders.CitationHypergraphDatasetLoader
_target_: topobenchmark.data.loaders.CitationHypergraphDatasetLoader
parameters:
data_domain: hypergraph
data_type: cocitation
Expand Down
8 changes: 4 additions & 4 deletions configs/model/cell/ccxn.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: ccxn
model_domain: cell

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -22,14 +22,14 @@ backbone_additional_params:
hidden_channels: ${model.feature_encoder.out_channels}

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.CCXNWrapper
_target_: topobenchmark.nn.wrappers.CCXNWrapper
_partial_: true
wrapper_name: CCXNWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
8 changes: 4 additions & 4 deletions configs/model/graph/gat.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: gat
model_domain: graph

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -22,14 +22,14 @@ backbone:
concat: true

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.GNNWrapper
_target_: topobenchmark.nn.wrappers.GNNWrapper
_partial_: true
wrapper_name: GNNWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: NoReadOut # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
8 changes: 4 additions & 4 deletions configs/model/graph/gin.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: gin
model_domain: graph

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -19,14 +19,14 @@ backbone:
act: relu

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.GNNWrapper
_target_: topobenchmark.nn.wrappers.GNNWrapper
_partial_: true
wrapper_name: GNNWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: NoReadOut # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
8 changes: 4 additions & 4 deletions configs/model/hypergraph/alldeepset.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: alldeepset
model_domain: hypergraph

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -27,14 +27,14 @@ backbone:
#num_features: ${model.backbone.hidden_channels}

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.HypergraphWrapper
_target_: topobenchmark.nn.wrappers.HypergraphWrapper
_partial_: true
wrapper_name: HypergraphWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
8 changes: 4 additions & 4 deletions configs/model/hypergraph/unignn2.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: unignn2
model_domain: hypergraph

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 128
Expand All @@ -21,14 +21,14 @@ backbone:
layer_drop: 0.0

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.HypergraphWrapper
_target_: topobenchmark.nn.wrappers.HypergraphWrapper
_partial_: true
wrapper_name: HypergraphWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
8 changes: 4 additions & 4 deletions configs/model/simplicial/sccn.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: sccn
model_domain: simplicial

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -18,14 +18,14 @@ backbone:
update_func: "sigmoid"

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.SCCNWrapper
_target_: topobenchmark.nn.wrappers.SCCNWrapper
_partial_: true
wrapper_name: SCCNWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
8 changes: 4 additions & 4 deletions configs/model/simplicial/sccnn.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: sccnn
model_domain: simplicial

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -31,14 +31,14 @@ backbone:
n_layers: 1

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.SCCNNWrapper
_target_: topobenchmark.nn.wrappers.SCCNNWrapper
_partial_: true
wrapper_name: SCCNNWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
12 changes: 6 additions & 6 deletions configs/model/simplicial/topotune.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: topotune
model_domain: simplicial
tune_gnn: GIN

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -16,9 +16,9 @@ feature_encoder:
- 2

backbone:
_target_: topobenchmarkx.nn.backbones.combinatorial.gccn.TopoTune
_target_: topobenchmark.nn.backbones.combinatorial.gccn.TopoTune
GNN:
_target_: topobenchmarkx.nn.backbones.graph.${model.tune_gnn}
_target_: topobenchmark.nn.backbones.graph.${model.tune_gnn}
in_channels: ${model.feature_encoder.out_channels}
out_channels: ${model.feature_encoder.out_channels}
hidden_channels: ${model.feature_encoder.out_channels}
Expand All @@ -35,14 +35,14 @@ backbone:
activation: relu

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.combinatorial.TuneWrapper
_target_: topobenchmark.nn.wrappers.combinatorial.TuneWrapper
_partial_: true
wrapper_name: TuneWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
12 changes: 6 additions & 6 deletions configs/model/simplicial/topotune_onehasse.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_target_: topobenchmarkx.model.TBXModel
_target_: topobenchmark.model.TBModel

model_name: topotune_onehasse
model_domain: simplicial
tune_gnn: GCN

feature_encoder:
_target_: topobenchmarkx.nn.encoders.${model.feature_encoder.encoder_name}
_target_: topobenchmark.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 32
Expand All @@ -16,9 +16,9 @@ feature_encoder:
- 2

backbone:
_target_: topobenchmarkx.nn.backbones.combinatorial.gccn_onehasse.TopoTune_OneHasse
_target_: topobenchmark.nn.backbones.combinatorial.gccn_onehasse.TopoTune_OneHasse
GNN:
_target_: topobenchmarkx.nn.backbones.graph.${model.tune_gnn}
_target_: topobenchmark.nn.backbones.graph.${model.tune_gnn}
in_channels: ${model.feature_encoder.out_channels}
out_channels: ${model.feature_encoder.out_channels}
hidden_channels: ${model.feature_encoder.out_channels}
Expand All @@ -34,14 +34,14 @@ backbone:
activation: relu

backbone_wrapper:
_target_: topobenchmarkx.nn.wrappers.combinatorial.TuneWrapper
_target_: topobenchmark.nn.wrappers.combinatorial.TuneWrapper
_partial_: true
wrapper_name: TuneWrapper
out_channels: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobenchmarkx.nn.readouts.${model.readout.readout_name}
_target_: topobenchmark.nn.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
num_cell_dimensions: ${infere_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
hidden_dim: ${model.feature_encoder.out_channels}
Expand Down
2 changes: 1 addition & 1 deletion configs/transforms/data_manipulations/identity.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
_target_: topobenchmarkx.transforms.data_transform.DataTransform
_target_: topobenchmark.transforms.data_transform.DataTransform
transform_name: "Identity"
transform_type: null
2 changes: 1 addition & 1 deletion configs/transforms/data_manipulations/mp_homophily.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.transforms.data_transform.DataTransform
_target_: topobenchmark.transforms.data_transform.DataTransform
transform_name: "MessagePassingHomophily"
transform_type: "data manipulation"
num_steps: 10
Expand Down
2 changes: 1 addition & 1 deletion configs/transforms/liftings/graph2hypergraph/khop.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.transforms.data_transform.DataTransform
_target_: topobenchmark.transforms.data_transform.DataTransform
transform_type: 'lifting'
transform_name: "HypergraphKHopLifting"
k_value: 1
Expand Down
Loading

0 comments on commit b8c03bc

Please sign in to comment.