MCPcopy
hub / github.com/dmlc/dgl / load_state_dict

Method load_state_dict

python/dgl/optim/pytorch/sparse_optim.py:476–493  ·  view source on GitHub ↗

Load the optimizer states. This method must be called by all processes sharing the underlying embedding with identical :attr:`state_dict`. NOTE: This method must be called by all processes sharing the underlying embedding, or it may result in a deadlock. Par

(
        self, state_dict, **kwargs
    )

Source from the content-addressed store, hash-verified

474 }
475
476 def load_state_dict(
477 self, state_dict, **kwargs
478 ): # pylint: disable=unused-argument
479 """Load the optimizer states. This method must be called by all
480 processes sharing the underlying embedding with identical
481 :attr:`state_dict`.
482
483 NOTE: This method must be called by all processes sharing the
484 underlying embedding, or it may result in a deadlock.
485
486 Parameters
487 ----------
488 state_dict : dictionary of optimizer states
489 The global states to pull values from.
490 """
491 for emb in self._params:
492 emb._all_set_optm_state(state_dict["state"][emb.name])
493 self._set_param_groups(state_dict["param_groups"])
494
495 @property
496 @abstractmethod

Callers 15

load_checkpointMethod · 0.80
train_val_pipelineFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
graph_classify_taskFunction · 0.80
evaluateFunction · 0.80
mainFunction · 0.80
train_cls.pyFile · 0.80
main.pyFile · 0.80
train_cls.pyFile · 0.80
train_partseg.pyFile · 0.80

Calls 2

_set_param_groupsMethod · 0.95
_all_set_optm_stateMethod · 0.80

Tested by 3

mainFunction · 0.64
mainFunction · 0.64