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

Method check

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

Source from the content-addressed store, hash-verified

276 return bool(overflow)
277
278 def check(self, param_groups=None):
279 params = []
280 has_moe_params = False
281 if param_groups is None:
282 params = self.params
283 has_moe_params = self.has_moe_params
284 else:
285 assert param_groups is not None, \
286 "self.params and param_groups both cannot be none"
287
288 for group in param_groups:
289 for param in group:
290 params.append(param)
291 if is_moe_param(param):
292 has_moe_params = True
293
294 return self.has_overflow(params, has_moe_params=has_moe_params)
295
296 # `params` is a list / generator of torch.Variable
297 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