diff --git a/src/anemoi/inference/metadata.py b/src/anemoi/inference/metadata.py index 849acda..64adcb3 100644 --- a/src/anemoi/inference/metadata.py +++ b/src/anemoi/inference/metadata.py @@ -13,6 +13,7 @@ import warnings from collections import defaultdict from functools import cached_property +from types import MappingProxyType as frozendict from typing import Literal import numpy as np @@ -37,15 +38,6 @@ def _remove_full_paths(x): return x -class frozendict(dict): - def __deepcopy__(self, memo): - # As this is a frozendict, we can return the same object - return self - - def __setitem__(self, key, value): - raise TypeError("frozendict is immutable") - - class Metadata(PatchMixin, LegacyMixin): """An object that holds metadata of a checkpoint."""