Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,272 changes: 5,272 additions & 0 deletions 2026_tdl_challenge/outputs/2026-05-19_22-43-31/results.json

Large diffs are not rendered by default.

62,275 changes: 62,258 additions & 17 deletions 2026_tdl_challenge/run_evaluation.ipynb

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions configs/model/graph/nsp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
_target_: topobench.model.TBModel

model_name: nsp
model_domain: graph

feature_encoder:
_target_: topobench.nn.encoders.${model.feature_encoder.encoder_name}
encoder_name: AllCellFeatureEncoder
in_channels: ${infer_in_channels:${dataset},${oc.select:transforms,null}}
out_channels: 64
proj_dropout: 0.0

backbone:
_target_: topobench.nn.backbones.NSPEncoder
input_dim: ${model.feature_encoder.out_channels}
hidden_dim: ${model.feature_encoder.out_channels} # SWEEP!: [32,64] (not more because feature dim of graph only 15)
num_layers: 2 # SWEEP: [2,4] (3 if we have a lot of time)
dropout: 0.4 # SWEEP: [0.0, 0.25, 0.5]
sheaf_type: bundle # SWEEP: [diag, bundle]
d: 3 # no sweep.
input_dropout: 0.0 # no sweep.

backbone_wrapper:
_target_: topobench.nn.wrappers.${model.backbone_wrapper.wrapper_name}
_partial_: true
wrapper_name: GNNWrapper
out_channels: ${model.feature_encoder.out_channels}
residual_connections: false
num_cell_dimensions: ${infer_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}}

readout:
_target_: topobench.nn.readouts.${model.readout.readout_name}
readout_name: MLPReadout
num_cell_dimensions: ${infer_num_cell_dimensions:${oc.select:model.feature_encoder.selected_dimensions,null},${model.feature_encoder.in_channels}} # The highest order of cell dimensions to consider
in_channels: ${model.feature_encoder.out_channels}
hidden_layers: [16]
out_channels: ${dataset.parameters.num_classes}
task_level: ${define_task_level:${dataset.parameters.task_level},${dataset.split_params.learning_setting}} # Handles the edge case of node-inductive task
pooling_type: sum
# Extra MLP params
dropout: 0.2
act: "relu"
norm: null
final_act: null

# compile model for faster training with pytorch 2.0
compile: false
3 changes: 2 additions & 1 deletion topobench/evaluator/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def discover_metrics(cls, package_path: str) -> dict[str, type]:

try:
# Use importlib to safely import the module
module_name = f"{package_dir.stem}.{file_path.stem}"
package_name = package_dir.parent.parent.stem + "." + package_dir.parent.stem + "." + package_dir.stem
module_name = f"{package_name}.{file_path.stem}"
module = importlib.import_module(module_name)

# Find all loss classes in the module
Expand Down
3 changes: 2 additions & 1 deletion topobench/loss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def discover_losses(cls, package_path: str) -> dict[str, type]:

try:
# Use importlib to safely import the module
module_name = f"{package_dir.stem}.{file_path.stem}"
package_name = package_dir.parent.stem + "." + package_dir.stem
module_name = f"{package_name}.{file_path.stem}"
module = importlib.import_module(module_name)

# Find all loss classes in the module
Expand Down
3 changes: 2 additions & 1 deletion topobench/loss/dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def discover_losses(cls, package_path: str) -> dict[str, type]:

try:
# Use importlib to safely import the module
module_name = f"{package_dir.stem}.{file_path.stem}"
package_name = package_dir.parent.parent.stem + "." + package_dir.parent.stem + "." + package_dir.stem
module_name = f"{package_name}.{file_path.stem}"
module = importlib.import_module(module_name)

# Find all loss classes in the module
Expand Down
3 changes: 2 additions & 1 deletion topobench/loss/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def discover_losses(cls, package_path: str) -> dict[str, type]:

try:
# Use importlib to safely import the module
module_name = f"{package_dir.stem}.{file_path.stem}"
package_name = package_dir.parent.parent.stem + "." + package_dir.parent.stem + "." + package_dir.stem
module_name = f"{package_name}.{file_path.stem}"
module = importlib.import_module(module_name)

# Find all loss classes in the module
Expand Down
Loading