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

Method __delattr__

imperative/python/megengine/module/module.py:690–695  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

688 self.__dict__.update(state)
689
690 def __delattr__(self, name: str):
691 if name in self.__dict__ and _is_module(self.__dict__[name]):
692 modules = self.__dict__.get("_modules")
693 if name in modules:
694 modules.remove(name)
695 super().__delattr__(name)
696
697 def _module_info_string(self) -> str:
698 r"""Set the extra representation of the module."""

Callers

nothing calls this directly

Calls 3

_is_moduleFunction · 0.85
getMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected