MCPcopy Create free account
hub / github.com/apple/ml-pointersect / check_valid

Method check_valid

cdslib/core/nn/nn_utils.py:348–366  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

346 return len(self.param_dict)
347
348 def check_valid(self):
349 return self.check_dict_valid(d=self.param_dict)
350 # valid = True
351 # for key, val in self.param_dict.items():
352 # if isinstance(val, HyperParams):
353 # valid = valid and val.check_valid()
354 # if not valid:
355 # return False
356 # elif isinstance(val, dict):
357 # for k, v in val.items():
358 # if isinstance(v, HyperParams.TBD):
359 # return False
360 # elif isinstance(val, (list, tuple, set)):
361 # for v in val:
362 # if isinstance(v, HyperParams.TBD):
363 # return False
364 # elif isinstance(val, HyperParams.TBD):
365 # return False
366 # return valid
367
368 @staticmethod
369 def check_dict_valid(d: T.MutableMapping[str, T.Any]) -> bool:

Callers 1

check_dict_validMethod · 0.80

Calls 1

check_dict_validMethod · 0.95

Tested by

no test coverage detected