Skip to content

Commit

Permalink
[UX] Improve Formatting of Post Job Creation Logs (#4198)
Browse files Browse the repository at this point in the history
* Update cloud_vm_ray_backend.py

* Update cloud_vm_ray_backend.py

* format
  • Loading branch information
andylizf authored Nov 7, 2024
1 parent e382e7c commit f013073
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3262,6 +3262,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
Expand Down Expand Up @@ -3373,9 +3374,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}'
Expand All @@ -3392,8 +3393,9 @@ 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}'
Expand Down

0 comments on commit f013073

Please sign in to comment.