From 7de0b44598b1ddae418979ebfc4c16fc029edf8f Mon Sep 17 00:00:00 2001 From: Mario Santa Cruz Date: Sun, 24 Nov 2024 09:22:12 +0000 Subject: [PATCH] fix: set default value for optional kwargs in deprecated config --- src/anemoi/graphs/create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anemoi/graphs/create.py b/src/anemoi/graphs/create.py index 74d23eb..9550559 100644 --- a/src/anemoi/graphs/create.py +++ b/src/anemoi/graphs/create.py @@ -66,8 +66,8 @@ def update_graph(self, graph: HeteroData) -> HeteroData: edge_builder_cfg = edges_cfg.get("edge_builder") if edge_builder_cfg is not None: - edge_builder_cfg.source_mask_attr_name = edges_cfg.get("source_mask_attr_name") - edge_builder_cfg.target_mask_attr_name = edges_cfg.get("target_mask_attr_name") + edge_builder_cfg.source_mask_attr_name = edges_cfg.get("source_mask_attr_name", None) + edge_builder_cfg.target_mask_attr_name = edges_cfg.get("target_mask_attr_name", None) edges_cfg.edge_builders = [edge_builder_cfg] for edge_builder_cfg in edges_cfg.edge_builders: