(self, fn)
| 217 | |
| 218 | class lazy_load: |
| 219 | def __init__(self, fn): |
| 220 | self.zf = torch._C.PyTorchFileReader(str(fn)) |
| 221 | with BytesIO(self.zf.get_record("data.pkl")) as pkl: |
| 222 | mup = LazyLoadingUnpickler(pkl, self) |
| 223 | self.sd = mup.load() |
| 224 | |
| 225 | def __enter__(self): |
| 226 | return self.sd |
no test coverage detected