From 789b98145c436d898d625169921c0352eee3b484 Mon Sep 17 00:00:00 2001 From: gaoxinxing <15031259256@163.com> Date: Wed, 12 Oct 2022 18:33:12 +0800 Subject: [PATCH 1/3] add more details for log --- client/starwhale/core/job/model.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/starwhale/core/job/model.py b/client/starwhale/core/job/model.py index 0dc0a4cbe0..da67e40dfd 100644 --- a/client/starwhale/core/job/model.py +++ b/client/starwhale/core/job/model.py @@ -1,5 +1,6 @@ import time import typing as t +import traceback import concurrent.futures from typing import List, Optional from pathlib import Path @@ -169,6 +170,9 @@ def execute(self) -> TaskResult: # The standard implementation does not return results func() except Exception as e: + logger.exception( + f"execute step:{self.context} occur error: {e}, {traceback.format_exc()}" + ) self.exception = e self.status = STATUS.FAILED else: From 1303399f2e58950781c0733922e51a2e9f9b7064 Mon Sep 17 00:00:00 2001 From: gaoxinxing <15031259256@163.com> Date: Thu, 13 Oct 2022 16:15:42 +0800 Subject: [PATCH 2/3] add more details for log --- client/starwhale/core/job/model.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/starwhale/core/job/model.py b/client/starwhale/core/job/model.py index da67e40dfd..80b0f96e1e 100644 --- a/client/starwhale/core/job/model.py +++ b/client/starwhale/core/job/model.py @@ -170,9 +170,7 @@ def execute(self) -> TaskResult: # The standard implementation does not return results func() except Exception as e: - logger.exception( - f"execute step:{self.context} occur error: {e}, {traceback.format_exc()}" - ) + logger.exception(e) self.exception = e self.status = STATUS.FAILED else: From b3af9b0b2939f2c72437e71ab3d2902e243ed784 Mon Sep 17 00:00:00 2001 From: gaoxinxing <15031259256@163.com> Date: Thu, 13 Oct 2022 16:38:08 +0800 Subject: [PATCH 3/3] add more details for log --- client/starwhale/core/job/model.py | 1 - client/starwhale/core/job/scheduler.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/starwhale/core/job/model.py b/client/starwhale/core/job/model.py index 80b0f96e1e..ea2fabff68 100644 --- a/client/starwhale/core/job/model.py +++ b/client/starwhale/core/job/model.py @@ -1,6 +1,5 @@ import time import typing as t -import traceback import concurrent.futures from typing import List, Optional from pathlib import Path diff --git a/client/starwhale/core/job/scheduler.py b/client/starwhale/core/job/scheduler.py index f68b374d1f..b6bb0400b2 100644 --- a/client/starwhale/core/job/scheduler.py +++ b/client/starwhale/core/job/scheduler.py @@ -80,6 +80,13 @@ def schedule(self) -> t.List[StepResult]: if indegree_dict[v_to] == 0: prepared_vertices.add(v_to) + if not all( + [ + all(tr.status == STATUS.SUCCESS for tr in sr.task_results) + for sr in step_results + ] + ): + break return _results def schedule_single_step(self, step_name: str) -> StepResult: