MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / check

Method check

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

Source from the content-addressed store, hash-verified

209 return bool(overflow)
210
211 def check(self, param_groups=None):
212 params = []
213 has_moe_params = False
214 if param_groups is None:
215 params = self.params
216 has_moe_params = self.has_moe_params
217 else:
218 assert param_groups is not None, \
219 "self.params and param_groups both cannot be none"
220
221 for group in param_groups:
222 for param in group:
223 params.append(param)
224 if is_moe_param(param):
225 has_moe_params = True
226
227 return self.has_overflow(params, has_moe_params=has_moe_params)
228
229 # `params` is a list / generator of torch.Variable
230 def has_overflow_serial(self, params):

Callers 1

stepMethod · 0.80

Calls 3

has_overflowMethod · 0.95
is_moe_paramFunction · 0.90
appendMethod · 0.45

Tested by

no test coverage detected