MCPcopy Index your code
hub / github.com/InternLM/InternLM / load

Method load

internlm/utils/storage_manager.py:285–290  ·  view source on GitHub ↗
(handler, fp: str, *args, **kwargs)

Source from the content-addressed store, hash-verified

283
284 @staticmethod
285 def load(handler, fp: str, *args, **kwargs): # pylint: disable=W0613
286 assert isinstance(handler, LocalClient)
287 assert os.path.exists(fp), f"{fp} is not found!"
288 with open(fp, "rb") as f:
289 states = torch.load(f, *args, **kwargs)
290 return states
291
292 @staticmethod
293 def assert_fp_exists(handler, folder):

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected