MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / _safe_deserialize

Method _safe_deserialize

monai/data/dataset.py:630–632  ·  view source on GitHub ↗

Load the object from the given bytes data, this must be loadable as weights only using `torch.load`.

(self, val)

Source from the content-addressed store, hash-verified

628 return out.read()
629
630 def _safe_deserialize(self, val):
631 """Load the object from the given bytes data, this must be loadable as weights only using `torch.load`."""
632 return torch.load(BytesIO(val), map_location="cpu", weights_only=True)
633
634 def _fill_cache_start_reader(self, show_progress=True):
635 """

Callers 1

_cachecheckMethod · 0.95

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected