From 9059eea4f46cf47a9f1382b97f25ab5f4586a5da Mon Sep 17 00:00:00 2001 From: "yi.wu" Date: Thu, 2 Mar 2017 15:58:39 +0800 Subject: [PATCH] Fix k8s cluster job rerunable --- doc/howto/usage/k8s/src/k8s_train/start_paddle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/howto/usage/k8s/src/k8s_train/start_paddle.py b/doc/howto/usage/k8s/src/k8s_train/start_paddle.py index f1a770ccb54..935c12bb67e 100755 --- a/doc/howto/usage/k8s/src/k8s_train/start_paddle.py +++ b/doc/howto/usage/k8s/src/k8s_train/start_paddle.py @@ -132,7 +132,8 @@ def startPaddle(idMap={}, train_args_dict=None): logDir = JOB_PATH_OUTPUT + "/node_" + str(trainerId) if not os.path.exists(JOB_PATH_OUTPUT): os.makedirs(JOB_PATH_OUTPUT) - os.mkdir(logDir) + if not os.path.exists(logDir): + os.mkdir(logDir) copyCommand = 'cp -rf ' + JOB_PATH + \ "/" + str(trainerId) + "/data/*" + " ./data/" os.system(copyCommand) -- GitLab