MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __getstate__

Method __getstate__

imperative/python/megengine/traced_module/expr.py:569–581  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

567 )
568
569 def __getstate__(self):
570 opdef_state = self.opdef.__getstate__()
571 opdef_state["opdef_type"] = type(self.opdef)
572 state = {
573 "_id": self._id,
574 "_disable_remove": self._disable_remove,
575 "opdef_state": opdef_state,
576 "inputs": self.inputs,
577 "outputs": self.outputs,
578 "version": __version__,
579 }
580 _check_obj_attr(state)
581 return state
582
583 def __setstate__(self, state):
584 # compat with mge 1.6

Callers

nothing calls this directly

Calls 2

_check_obj_attrFunction · 0.85
__getstate__Method · 0.45

Tested by

no test coverage detected