MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / _IncompatibleKeys

Class _IncompatibleKeys

SwissArmyTransformer/sat/training/model_io.py:28–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26# for overriding pytorch's save/load state_dict for zero3
27_EXTRA_STATE_KEY_SUFFIX = '_extra_state' # pytorch default name
28class _IncompatibleKeys(namedtuple('IncompatibleKeys', ['missing_keys', 'unexpected_keys'])):
29 def __repr__(self):
30 if not self.missing_keys and not self.unexpected_keys:
31 return '<All keys matched successfully>'
32 return super().__repr__()
33 __str__ = __repr__
34
35
36def get_checkpoint_name(checkpoints_path, iteration, release=False, zero=False, use_ema=False):

Callers 2

loadFunction · 0.85
zero3_load_state_dictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected