From d9829d28644eb76bef556e4223b7890f66f1c298 Mon Sep 17 00:00:00 2001 From: Yicheng-Lu-llll Date: Thu, 22 Jun 2023 00:12:03 +0000 Subject: [PATCH 1/3] test Signed-off-by: Yicheng-Lu-llll --- flytekit/bin/entrypoint.py | 2 +- flytekit/deck/deck.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/flytekit/bin/entrypoint.py b/flytekit/bin/entrypoint.py index a2b21260ed..21441c63db 100644 --- a/flytekit/bin/entrypoint.py +++ b/flytekit/bin/entrypoint.py @@ -159,7 +159,7 @@ def _dispatch_execute( ctx.file_access.put_data(ctx.execution_state.engine_dir, output_prefix, is_multipart=True) logger.info(f"Engine folder written successfully to the output prefix {output_prefix}") - + print("entrypoint:", task_def.name.split(".")[-1]) if not task_def.disable_deck: _output_deck(task_def.name.split(".")[-1], ctx.user_space_params) diff --git a/flytekit/deck/deck.py b/flytekit/deck/deck.py index c011a218a6..4ba81344fe 100644 --- a/flytekit/deck/deck.py +++ b/flytekit/deck/deck.py @@ -72,6 +72,17 @@ def name(self) -> str: def html(self) -> str: return self._html + @classmethod + def persist(self): + task_name = FlyteContextManager.current_context().user_space_params.task_id.name + print("persist:", FlyteContextManager.current_context().user_space_params.task_id) + print("persist:", task_name) + print("persist:", task_name.split(".")[-1]) + new_user_params = FlyteContextManager.current_context().user_space_params + _output_deck(task_name , new_user_params) + + + class TimeLineDeck(Deck): """ From 6040dcf94a18e319aec20d2074aacfda8118ede8 Mon Sep 17 00:00:00 2001 From: Yicheng-Lu-llll Date: Thu, 22 Jun 2023 00:19:14 +0000 Subject: [PATCH 2/3] real time deck support Signed-off-by: Yicheng-Lu-llll --- flytekit/bin/entrypoint.py | 1 - flytekit/deck/deck.py | 3 --- 2 files changed, 4 deletions(-) diff --git a/flytekit/bin/entrypoint.py b/flytekit/bin/entrypoint.py index 21441c63db..c47313b805 100644 --- a/flytekit/bin/entrypoint.py +++ b/flytekit/bin/entrypoint.py @@ -159,7 +159,6 @@ def _dispatch_execute( ctx.file_access.put_data(ctx.execution_state.engine_dir, output_prefix, is_multipart=True) logger.info(f"Engine folder written successfully to the output prefix {output_prefix}") - print("entrypoint:", task_def.name.split(".")[-1]) if not task_def.disable_deck: _output_deck(task_def.name.split(".")[-1], ctx.user_space_params) diff --git a/flytekit/deck/deck.py b/flytekit/deck/deck.py index 4ba81344fe..c1c7e990ee 100644 --- a/flytekit/deck/deck.py +++ b/flytekit/deck/deck.py @@ -75,9 +75,6 @@ def html(self) -> str: @classmethod def persist(self): task_name = FlyteContextManager.current_context().user_space_params.task_id.name - print("persist:", FlyteContextManager.current_context().user_space_params.task_id) - print("persist:", task_name) - print("persist:", task_name.split(".")[-1]) new_user_params = FlyteContextManager.current_context().user_space_params _output_deck(task_name , new_user_params) From 2239968e3f82e15957ef7d2dd4c29885d29321b1 Mon Sep 17 00:00:00 2001 From: Yicheng-Lu-llll Date: Thu, 22 Jun 2023 00:28:21 +0000 Subject: [PATCH 3/3] lint Signed-off-by: Yicheng-Lu-llll --- flytekit/bin/entrypoint.py | 1 + flytekit/deck/deck.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/flytekit/bin/entrypoint.py b/flytekit/bin/entrypoint.py index c47313b805..a2b21260ed 100644 --- a/flytekit/bin/entrypoint.py +++ b/flytekit/bin/entrypoint.py @@ -159,6 +159,7 @@ def _dispatch_execute( ctx.file_access.put_data(ctx.execution_state.engine_dir, output_prefix, is_multipart=True) logger.info(f"Engine folder written successfully to the output prefix {output_prefix}") + if not task_def.disable_deck: _output_deck(task_def.name.split(".")[-1], ctx.user_space_params) diff --git a/flytekit/deck/deck.py b/flytekit/deck/deck.py index c1c7e990ee..024fff2479 100644 --- a/flytekit/deck/deck.py +++ b/flytekit/deck/deck.py @@ -76,9 +76,7 @@ def html(self) -> str: def persist(self): task_name = FlyteContextManager.current_context().user_space_params.task_id.name new_user_params = FlyteContextManager.current_context().user_space_params - _output_deck(task_name , new_user_params) - - + _output_deck(task_name, new_user_params) class TimeLineDeck(Deck):