MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / get_module

Method get_module

deepspeed/runtime/state_dict_factory.py:148–154  ·  view source on GitHub ↗
(self, sd)

Source from the content-addressed store, hash-verified

146 return 'model'
147
148 def get_module(self, sd):
149 if self.module_key is None:
150 return sd
151 elif self.module_key == AUTO_MODULE_KEY:
152 return sd[self._choose_module_key(sd)]
153 else:
154 return sd[self.module_key]
155
156 def set_module(self, sd, module):
157 if self.module_key is None:

Callers 4

loadMethod · 0.95
merge_state_dictMethod · 0.80
split_state_dictMethod · 0.80
sanity_checkMethod · 0.80

Calls 1

_choose_module_keyMethod · 0.95

Tested by

no test coverage detected