Skip to content

Commit

Permalink
fix: make config object optional
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperDramsch committed Sep 11, 2024
1 parent 79fd11a commit 3e626b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/anemoi/models/data_indices/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ def __init__(self, config, name_to_index) -> None:
self.diagnostic = (
[] if config.data.diagnostic is None else OmegaConf.to_container(config.data.diagnostic, resolve=True)
)
# config.data.remapped is a list of diccionaries: every remapper is one entry of the list
# config.data.remapped is an optional dictionary with every remapper as one entry
self.remapped = (
dict() if config.data.remapped is None else OmegaConf.to_container(config.data.remapped, resolve=True)
dict()
if config.data.get("remapped") is None
else OmegaConf.to_container(config.data.remapped, resolve=True)
)
self.forcing_remapped = self.forcing.copy()

Expand Down

0 comments on commit 3e626b6

Please sign in to comment.