!29652 Unify server and scheduler exit funcition
Merge pull request !29652 from ZPaC/1.6-unify-exit-for-server-sched
This commit is contained in:
commit
d18c6f630f
|
@ -35,7 +35,6 @@ void Scheduler::Run() {
|
|||
if (!scheduler_node_->Stop()) {
|
||||
MS_LOG(WARNING) << "Scheduler stop failed.";
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
} // namespace ps
|
||||
} // namespace mindspore
|
||||
|
|
|
@ -616,7 +616,7 @@ class Model:
|
|||
outputs = train_network(*inputs)
|
||||
cb_params.net_outputs = outputs
|
||||
list_callback.step_end(run_context)
|
||||
if _is_role_pserver():
|
||||
if _is_role_pserver() or _is_role_sched():
|
||||
os._exit(0)
|
||||
|
||||
dataset_helper.continue_send()
|
||||
|
@ -680,7 +680,7 @@ class Model:
|
|||
self._loss_scale_manager.update_loss_scale(overflow)
|
||||
|
||||
list_callback.step_end(run_context)
|
||||
if _is_role_pserver():
|
||||
if _is_role_pserver() or _is_role_sched():
|
||||
os._exit(0)
|
||||
should_stop = should_stop or run_context.get_stop_requested()
|
||||
if should_stop:
|
||||
|
|
Loading…
Reference in New Issue