Skip to content

Commit

Permalink
Hints for spot controller in sky status output. (#1467)
Browse files Browse the repository at this point in the history
* Hints for spot controller in `sky status` output.

* Update hint.

* Update message.

* Reword

* Reorder

* pylint

* Reword

* Remnant.
  • Loading branch information
concretevitamin authored and iojw committed Feb 18, 2023
1 parent 99db7f7 commit 4c40192
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,7 @@ def _exec_code_on_head(
'\nTo cancel the job:\t\t'
f'{backend_utils.BOLD}sky spot cancel {job_id}'
f'{backend_utils.RESET_BOLD}'
'\nTo stream the logs:\t\t'
'\nTo stream job logs:\t\t'
f'{backend_utils.BOLD}sky spot logs {job_id}'
f'{backend_utils.RESET_BOLD}'
f'\nTo stream controller logs:\t'
Expand All @@ -2387,7 +2387,7 @@ def _exec_code_on_head(
'\nTo cancel the job:\t'
f'{backend_utils.BOLD}sky cancel {name} {job_id}'
f'{backend_utils.RESET_BOLD}'
'\nTo stream the logs:\t'
'\nTo stream job logs:\t'
f'{backend_utils.BOLD}sky logs {name} {job_id}'
f'{backend_utils.RESET_BOLD}'
'\nTo view the job queue:\t'
Expand Down
2 changes: 1 addition & 1 deletion sky/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ def _is_spot_controller_up(

@cli.group(cls=_NaturalOrderGroup)
def spot():
"""Managed spot instances related commands."""
"""Commands for managed spot jobs."""
pass


Expand Down
6 changes: 5 additions & 1 deletion sky/utils/cli_utils/status_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ def show_status_table(cluster_records: List[Dict[str, Any]],
autostop_minutes = spot.SPOT_CONTROLLER_IDLE_MINUTES_TO_AUTOSTOP
click.echo(f'\n{colorama.Fore.CYAN}{colorama.Style.BRIGHT}'
f'{reserved_group_name}{colorama.Style.RESET_ALL}'
f'{colorama.Style.DIM} (will be autostopped if idle for '
f'{colorama.Style.DIM} (autostopped if idle for '
f'{autostop_minutes}min)'
f'{colorama.Style.RESET_ALL}')
reset = backend_utils.RESET_BOLD
click.echo('Use spot jobs CLI: '
f'{colorama.Style.BRIGHT}sky spot --help{reset}')

else:
click.echo(f'{colorama.Fore.CYAN}{colorama.Style.BRIGHT}Clusters'
f'{colorama.Style.RESET_ALL}')
Expand Down

0 comments on commit 4c40192

Please sign in to comment.