Skip to content

Commit

Permalink
support old weights
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Jun 16, 2024
1 parent 6aa56a8 commit 0630bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anemoi/inference/checkpoint/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def to_dict(self):

@classmethod
def from_metadata(cls, metadata):
if metadata is None:
if metadata is None or "dataset" not in metadata:
metadata = dict(version="0.0.0", dataset=dict(version="0.0.0"))

if isinstance(metadata["dataset"], list):
Expand Down

0 comments on commit 0630bc9

Please sign in to comment.