Skip to content

Commit

Permalink
fix: set default value for optional kwargs in deprecated config
Browse files Browse the repository at this point in the history
  • Loading branch information
JPXKQX committed Nov 24, 2024
1 parent 71b52e7 commit 7de0b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/anemoi/graphs/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7de0b44

Please sign in to comment.