MCPcopy
hub / github.com/yangchris11/samurai / load_checkpoint

Method load_checkpoint

sam2/training/trainer.py:382–389  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

380 assert success
381
382 def load_checkpoint(self):
383 ckpt_path = get_resume_checkpoint(self.checkpoint_conf.save_dir)
384 if ckpt_path is None:
385 self._init_model_state()
386 else:
387 if self.checkpoint_conf.initialize_after_preemption:
388 self._call_model_initializer()
389 self._load_resuming_checkpoint(ckpt_path)
390
391 def _init_model_state(self):
392 # Checking that parameters that won't be saved are indeed frozen

Callers 1

__init__Method · 0.95

Calls 4

_init_model_stateMethod · 0.95
get_resume_checkpointFunction · 0.90

Tested by

no test coverage detected