Skip to content

Commit

Permalink
refactor conf
Browse files Browse the repository at this point in the history
  • Loading branch information
levtelyatnikov committed May 15, 2024
1 parent 3b87ee9 commit 8173c96
Show file tree
Hide file tree
Showing 23 changed files with 475 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
_target_: topobenchmarkx.transforms.data_transform.DataTransform
transform_type: 'lifting'
transform_name: "CellCyclesLifting"
k_value: 1
complex_dim: ${oc.select:dataset.parameters.max_dim_if_lifted,3}
max_cell_length: 6
preserve_edge_attr: ${oc.select:dataset.parameters.preserve_edge_attr_if_lifted,False}
3 changes: 2 additions & 1 deletion configs/model/cell/can.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: can
model_domain: cell
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0
selected_dimensions:
- 0
- 1
Expand Down
6 changes: 3 additions & 3 deletions configs/model/cell/cccn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: cwn_dcm
model_domain: cell
Expand All @@ -8,15 +8,15 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0
proj_dropout: 0.
selected_dimensions:
- 0
- 1

backbone:
_target_: custom_models.cell.cccn.CCCN
in_channels: ${model.feature_encoder.out_channels}
n_layers: 1
n_layers: 4
dropout: 0.0

backbone_wrapper:
Expand Down
3 changes: 2 additions & 1 deletion configs/model/cell/ccxn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: ccxn
model_domain: cell
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: topomodelx.nn.cell.ccxn.CCXN
Expand Down
8 changes: 4 additions & 4 deletions configs/model/cell/cwn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: cwn
model_domain: cell
Expand All @@ -7,7 +7,7 @@ feature_encoder:
_target_: topobenchmarkx.models.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
out_channels: 64
proj_dropout: 0.0

backbone:
Expand All @@ -16,7 +16,7 @@ backbone:
in_channels_1: ${model.feature_encoder.out_channels}
in_channels_2: ${model.feature_encoder.out_channels}
hid_channels: ${model.feature_encoder.out_channels}
n_layers: 1
n_layers: 4

backbone_wrapper:
_target_: topobenchmarkx.models.wrappers.CWNWrapper
Expand All @@ -27,7 +27,7 @@ backbone_wrapper:

readout:
_target_: topobenchmarkx.models.readouts.${model.readout.readout_name}
readout_name: PropagateSignalDown # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
readout_name: NoReadOut # Use <NoReadOut> in case readout is not needed Options: PropagateSignalDown
hidden_dim: ${model.feature_encoder.out_channels}
num_cell_dimensions: ${infere_list_length:${model.feature_encoder.in_channels}}

Expand Down
3 changes: 2 additions & 1 deletion configs/model/graph/gat.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: gat
model_domain: graph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: torch_geometric.nn.models.GAT
Expand Down
7 changes: 4 additions & 3 deletions configs/model/graph/gcn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: gcn
model_domain: graph
Expand All @@ -7,13 +7,14 @@ feature_encoder:
_target_: topobenchmarkx.models.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 64
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: torch_geometric.nn.models.GCN
in_channels: ${model.feature_encoder.out_channels}
hidden_channels: ${model.feature_encoder.out_channels}
num_layers: 1
num_layers: 2
dropout: 0.0
act: relu

Expand Down
3 changes: 2 additions & 1 deletion configs/model/graph/gin.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: gin
model_domain: graph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: torch_geometric.nn.models.GIN
Expand Down
3 changes: 2 additions & 1 deletion configs/model/hypergraph/alldeepset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: alldeepset
model_domain: hypergraph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: topomodelx.nn.hypergraph.allset.AllSet
Expand Down
3 changes: 2 additions & 1 deletion configs/model/hypergraph/allsettransformer.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: allsettransformer
model_domain: hypergraph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: topomodelx.nn.hypergraph.allset_transformer.AllSetTransformer
Expand Down
3 changes: 2 additions & 1 deletion configs/model/hypergraph/edgnn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: edgnn
model_domain: hypergraph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 16
proj_dropout: 0.0

backbone:
_target_: custom_models.hypergraph.edgnn.EDGNN
Expand Down
3 changes: 2 additions & 1 deletion configs/model/hypergraph/unignn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: unignn2
mode_domain: hypergraph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: topomodelx.nn.hypergraph.unigcn.UniGCN
Expand Down
3 changes: 2 additions & 1 deletion configs/model/hypergraph/unignn2.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: unignn2
mode_domain: hypergraph
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: topomodelx.nn.hypergraph.unigcnii.UniGCNII
Expand Down
3 changes: 2 additions & 1 deletion configs/model/simplicial/san.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: san
model_domain: simplicial
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 64
proj_dropout: 0.0
selected_dimensions:
- 0
- 1
Expand Down
4 changes: 3 additions & 1 deletion configs/model/simplicial/sccn.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: sccnn
model_domain: simplicial

feature_encoder:
_target_: topobenchmarkx.models.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} # ${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0

backbone:
_target_: topomodelx.nn.simplicial.sccn.SCCN
Expand Down
3 changes: 2 additions & 1 deletion configs/model/simplicial/sccnn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: sccnn
model_domain: simplicial
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0
selected_dimensions:
- 0
- 1
Expand Down
3 changes: 2 additions & 1 deletion configs/model/simplicial/sccnn_custom.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

model_name: sccnn_custom
model_domain: simplicial
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0
selected_dimensions:
- 0
- 1
Expand Down
3 changes: 2 additions & 1 deletion configs/model/simplicial/scn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_target_: topobenchmarkx.models.network_module.NetworkModule
_target_: topobenchmarkx.models.TopologicalNetworkModule

mdoel_name: scn
model_type: simplicial
Expand All @@ -8,6 +8,7 @@ feature_encoder:
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset}} #${dataset.parameters.num_features}
out_channels: 32
proj_dropout: 0.0
selected_dimensions:
- 0
- 1
Expand Down
2 changes: 1 addition & 1 deletion configs/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# order of defaults determines the order in which configs override each other
defaults:
- _self_
- dataset: IMDB-BINARY #us_country_demos
- dataset: REDDIT-BINARY #us_country_demos
- model: simplicial/sccnn_custom #hypergraph/unignn2 #allsettransformer
- evaluator: default
- callbacks: default
Expand Down
1 change: 0 additions & 1 deletion custom_models/cell/cin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch.nn as nn
import torch.nn.functional as F
from topomodelx.base.conv import Conv
from topomodelx.nn.cell.cwn_layer import CWNLayer
from torch_geometric.nn.models import MLP


Expand Down
1 change: 0 additions & 1 deletion custom_models/simplicial/sccnn.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""SCCNN implementation for complex classification."""

import torch
from topomodelx.nn.simplicial.sccnn_layer import SCCNNLayer
from torch.nn.parameter import Parameter


Expand Down
Loading

0 comments on commit 8173c96

Please sign in to comment.