forked from mindspore-Ecosystem/mindspore
!19898 Add value check
Merge pull request !19898 from ZPaC/1.3-change-dir
This commit is contained in:
commit
2c5fe50b37
|
@ -63,6 +63,7 @@ class FusedPullWeightKernel : public CPUKernel {
|
|||
fl_iteration_ = 1;
|
||||
}
|
||||
|
||||
MS_LOG(INFO) << "Start pulling weight for federated learning iteration " << fl_iteration_;
|
||||
if (!BuildPullWeightReq(fbb)) {
|
||||
MS_LOG(EXCEPTION) << "Building request for FusedPullWeight failed.";
|
||||
return false;
|
||||
|
|
|
@ -61,6 +61,7 @@ class FusedPushWeightKernel : public CPUKernel {
|
|||
fl_iteration_ = 1;
|
||||
}
|
||||
|
||||
MS_LOG(INFO) << "Start pushing weight for federated learning iteration " << fl_iteration_;
|
||||
if (!BuildPushWeightReq(fbb, inputs)) {
|
||||
MS_LOG(EXCEPTION) << "Building request for FusedPushWeight failed.";
|
||||
return false;
|
||||
|
|
|
@ -146,6 +146,7 @@ def _set_ps_context(**kwargs):
|
|||
for key, value in kwargs.items():
|
||||
if key not in _set_ps_context_func_map:
|
||||
raise ValueError("Set PS context keyword %s is not recognized!" % key)
|
||||
_check_value(key, value)
|
||||
set_func = _set_ps_context_func_map[key]
|
||||
set_func(value)
|
||||
|
||||
|
|
Loading…
Reference in New Issue