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

Method check

deepspeed/runtime/utils.py:260–276  ·  view source on GitHub ↗
(self, param_groups=None)

Source from the content-addressed store, hash-verified

258 return bool(overflow)
259
260 def check(self, param_groups=None):
261 params = []
262 has_moe_params = False
263 if param_groups is None:
264 params = self.params
265 has_moe_params = self.has_moe_params
266 else:
267 assert param_groups is not None, \
268 "self.params and param_groups both cannot be none"
269
270 for group in param_groups:
271 for param in group:
272 params.append(param)
273 if is_moe_param(param):
274 has_moe_params = True
275
276 return self.has_overflow(params, has_moe_params=has_moe_params)
277
278 # `params` is a list / generator of torch.Variable
279 def has_overflow_serial(self, params):

Callers 2

testMethod · 0.95
stepMethod · 0.80

Calls 3

has_overflowMethod · 0.95
is_moe_paramFunction · 0.90
appendMethod · 0.80

Tested by 1

testMethod · 0.76