MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / __init__

Method __init__

lit_gpt/utils_old.py:219–223  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

217
218class 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

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

loadMethod · 0.45

Tested by

no test coverage detected