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

Method set_module

deepspeed/runtime/state_dict_factory.py:156–163  ·  view source on GitHub ↗
(self, sd, module)

Source from the content-addressed store, hash-verified

154 return sd[self.module_key]
155
156 def set_module(self, sd, module):
157 if self.module_key is None:
158 sd = module
159 elif self.module_key == AUTO_MODULE_KEY:
160 sd[self._choose_module_key(sd)] = module
161 else:
162 sd[self.module_key] = module
163 return sd
164
165 def check_ckpt_list(self):
166 assert len(self.ckpt_list) > 0

Callers 3

loadMethod · 0.95
merge_state_dictMethod · 0.80
split_state_dictMethod · 0.80

Calls 1

_choose_module_keyMethod · 0.95

Tested by

no test coverage detected