From 2a2467140efa7c9a047f3b50f53bd9331f8f4b30 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Mon, 28 Oct 2024 12:41:01 +0800 Subject: [PATCH 1/3] Update cloud_vm_ray_backend.py --- sky/backends/cloud_vm_ray_backend.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index 918848b045b..f12772b753f 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -3406,9 +3406,9 @@ def _dump_code_to_file(codegen: str) -> None: controller = controller_utils.Controllers.from_name(name) if controller == controller_utils.Controllers.JOBS_CONTROLLER: logger.info( - f'\nšŸ“‹ Useful Commands' - f'\nManaged Job ID: ' + f'\n{fore.CYAN}Managed Job ID: ' f'{style.BRIGHT}{job_id}{style.RESET_ALL}' + f'\nšŸ“‹ Useful Commands' f'\n{ux_utils.INDENT_SYMBOL}To cancel the job:\t\t\t' f'{ux_utils.BOLD}sky jobs cancel {job_id}' f'{ux_utils.RESET_BOLD}' @@ -3425,8 +3425,10 @@ def _dump_code_to_file(codegen: str) -> None: f'dashboard:\t{ux_utils.BOLD}sky jobs dashboard' f'{ux_utils.RESET_BOLD}') elif controller is None: - logger.info(f'\nšŸ“‹ Useful Commands' - f'\nJob ID: {job_id}' + logger.info( + f'\n{fore.CYAN}Job ID: ' + f'{style.BRIGHT}{job_id}{style.RESET_ALL}' + f'\nšŸ“‹ Useful Commands' f'\n{ux_utils.INDENT_SYMBOL}To cancel the job:\t\t' f'{ux_utils.BOLD}sky cancel {name} {job_id}' f'{ux_utils.RESET_BOLD}' From ab830355fc317c0027a03fa4ca1c229f5f7d1614 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Mon, 28 Oct 2024 12:45:56 +0800 Subject: [PATCH 2/3] Update cloud_vm_ray_backend.py --- sky/backends/cloud_vm_ray_backend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index f12772b753f..63b617eb04f 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -3296,6 +3296,7 @@ def _exec_code_on_head( ) -> None: """Executes generated code on the head node.""" style = colorama.Style + fore = colorama.Fore script_path = os.path.join(SKY_REMOTE_APP_DIR, f'sky_job_{job_id}') remote_log_dir = self.log_dir From 9b56cd98fecc92da8bd765c2c395c48e9f663477 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Sun, 27 Oct 2024 21:53:22 -0700 Subject: [PATCH 3/3] format --- sky/backends/cloud_vm_ray_backend.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index 63b617eb04f..721e73d0ae3 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -3426,8 +3426,7 @@ def _dump_code_to_file(codegen: str) -> None: f'dashboard:\t{ux_utils.BOLD}sky jobs dashboard' f'{ux_utils.RESET_BOLD}') elif controller is None: - logger.info( - f'\n{fore.CYAN}Job ID: ' + logger.info(f'\n{fore.CYAN}Job ID: ' f'{style.BRIGHT}{job_id}{style.RESET_ALL}' f'\nšŸ“‹ Useful Commands' f'\n{ux_utils.INDENT_SYMBOL}To cancel the job:\t\t'