From 16eb976809a8a277ad5459248e45b8de56bb0631 Mon Sep 17 00:00:00 2001 From: levtelyatnikov Date: Thu, 31 Oct 2024 20:05:04 +0100 Subject: [PATCH 1/2] minor --- configs/run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/run.yaml b/configs/run.yaml index 989fff4b..2bb5d1b2 100755 --- a/configs/run.yaml +++ b/configs/run.yaml @@ -5,7 +5,7 @@ defaults: - _self_ - dataset: graph/cocitation_cora - - model: cell/topotune + - model: graph/gcn - transforms: ${get_default_transform:${dataset},${model}} #no_transform - optimizer: default - loss: default From ea28c1c75be4119bafc915f5e1e82c2414fc7ecf Mon Sep 17 00:00:00 2001 From: levtelyatnikov Date: Thu, 31 Oct 2024 20:21:30 +0100 Subject: [PATCH 2/2] allow use of resolver in ipynb --- topobenchmarkx/utils/config_resolvers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/topobenchmarkx/utils/config_resolvers.py b/topobenchmarkx/utils/config_resolvers.py index 48ef10ae..8f3385e1 100644 --- a/topobenchmarkx/utils/config_resolvers.py +++ b/topobenchmarkx/utils/config_resolvers.py @@ -28,9 +28,14 @@ def get_default_transform(dataset, model): if data_domain == "graph" and model_domain != "combinatorial": # Check if there is a default transform for the dataset at ./configs/transforms/dataset_defaults/ # If not, use the default lifting transform for the dataset to be compatible with the model + base_dir = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + ) + configs_dir = os.path.join( + base_dir, "configs", "transforms", "dataset_defaults" + ) datasets_with_defaults = [ - f.split(".")[0] - for f in os.listdir("./configs/transforms/dataset_defaults/") + f.split(".")[0] for f in os.listdir(configs_dir) ] if dataset in datasets_with_defaults: return f"dataset_defaults/{dataset}"