From 9227c212f18cb14121feff5dd37349329c9eee16 Mon Sep 17 00:00:00 2001 From: lizhenyu Date: Thu, 17 Dec 2020 20:06:33 +0800 Subject: [PATCH] [bugfix] server process does not exit after training finish --- mindspore/train/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mindspore/train/model.py b/mindspore/train/model.py index f6cd82cdd6..3af527cb6c 100755 --- a/mindspore/train/model.py +++ b/mindspore/train/model.py @@ -456,6 +456,8 @@ class Model: cb_params.cur_step_num += 1 cb_params.net_outputs = outputs list_callback.step_end(run_context) + if _is_role_pserver(): + os._exit(0) dataset_helper.continue_send() list_callback.epoch_end(run_context)