Load the object from the given bytes data, this must be loadable as weights only using `torch.load`.
(self, val)
| 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 | """ |