Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX] Improve Formatting of Post Job Creation Logs #4198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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
Expand Down Expand Up @@ -3406,9 +3407,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 @@ -3425,8 +3426,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
Loading