Unify server and scheduler exit funcition
This commit is contained in:
parent
f6e83e0383
commit
3db62b79ea
|
@ -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