From 37e57d5bac2da7cd2e2022d372a42f6212d44ee4 Mon Sep 17 00:00:00 2001 From: Atin Sood Date: Wed, 26 Oct 2022 17:50:00 -0400 Subject: [PATCH 1/2] minor print issues with app wrapper --- src/codeflare_sdk/cluster/cluster.py | 2 +- src/codeflare_sdk/utils/pretty_print.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codeflare_sdk/cluster/cluster.py b/src/codeflare_sdk/cluster/cluster.py index 071841510..477290a76 100644 --- a/src/codeflare_sdk/cluster/cluster.py +++ b/src/codeflare_sdk/cluster/cluster.py @@ -104,7 +104,7 @@ def list_all_clusters(print_to_console=True): def list_all_queued(print_to_console=True): app_wrappers = _get_app_wrappers(filter=[AppWrapperStatus.RUNNING, AppWrapperStatus.PENDING]) if print_to_console: - pretty_print.print_appwrappers_status(app_wrappers) + pretty_print.print_app_wrappers_status(app_wrappers) return app_wrappers diff --git a/src/codeflare_sdk/utils/pretty_print.py b/src/codeflare_sdk/utils/pretty_print.py index 04c84c22c..e721294c1 100644 --- a/src/codeflare_sdk/utils/pretty_print.py +++ b/src/codeflare_sdk/utils/pretty_print.py @@ -12,7 +12,7 @@ def print_no_resources_found(): console.print(Panel("[red]No resources found")) -def print_appwrappsers_status(app_wrappers:List[AppWrapper]): +def print_app_wrappers_status(app_wrappers:List[AppWrapper]): if not app_wrappers: print_no_resources_found() return #shortcircuit From b6582c59f9b61e4264c7f0cc54c4d24f4faa3ab1 Mon Sep 17 00:00:00 2001 From: Atin Sood Date: Wed, 26 Oct 2022 18:05:32 -0400 Subject: [PATCH 2/2] print app wrapper if job is queued --- src/codeflare_sdk/cluster/cluster.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/codeflare_sdk/cluster/cluster.py b/src/codeflare_sdk/cluster/cluster.py index 477290a76..9464079a9 100644 --- a/src/codeflare_sdk/cluster/cluster.py +++ b/src/codeflare_sdk/cluster/cluster.py @@ -77,6 +77,8 @@ def is_ready(self, print_to_console=True): elif appwrapper.status in [AppWrapperStatus.PENDING]: ready = False status = CodeFlareClusterStatus.QUEUED + if print_to_console: + pretty_print.print_app_wrappers_status([appwrapper]) return ready, status# no need to check the ray status since still in queue # check the ray cluster status