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

Hints for spot controller in sky status output. #1467

Merged
merged 8 commits into from
Dec 3, 2022
Merged

Conversation

concretevitamin
Copy link
Member

User reported some confusion on whether to use the controller to see spot job logs or not.

Adding some hints to hopefully address this confusion:

Screen Shot 2022-11-29 at 18 32 53

Managed spot controller (autostopped if idle for 10min)
  Directly interacting with the controller is typically not needed.
  View spot jobs: sky spot queue
  View job logs:  sky spot logs

NAME                          LAUNCHED     RESOURCES                          STATUS  AUTOSTOP  COMMAND
sky-spot-controller-8a3968f2  17 mins ago  1x AWS(m6i.2xlarge, disk_size=50)  UP      10m       sky spot launch sleep 1

Does this look better?

TODO:

  • check light colorscheme.

Comment on lines 104 to 112
click.echo(
f'{colorama.Style.DIM} Directly interacting with the '
f'controller is typically not needed.{colorama.Style.RESET_ALL}'
)
click.echo(
f' View spot jobs: {colorama.Style.BRIGHT}sky spot queue'
f'{reset}\n'
f' View job logs: {colorama.Style.BRIGHT}sky spot logs'
f'{reset}\n')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit verbose to me. How about:

Suggested change
click.echo(
f'{colorama.Style.DIM} Directly interacting with the '
f'controller is typically not needed.{colorama.Style.RESET_ALL}'
)
click.echo(
f' View spot jobs: {colorama.Style.BRIGHT}sky spot queue'
f'{reset}\n'
f' View job logs: {colorama.Style.BRIGHT}sky spot logs'
f'{reset}\n')
click.echo(
f'{colorama.Style.DIM} Directly interacting with the '
f'controller is typically not needed.{colorama.Style.RESET_ALL} (Check {colorama.Style.BRIGHT}sky spot --help{reset})'
)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-11-30 at 12 28 45

How about this? Reason: Putting them on one line seems to make the line too long and the command not noticeable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about For spot-related CLI, run: sky spot --help?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-11-30 at 14 27 14

Screen Shot 2022-11-30 at 14 28 01

Three versions. The bottom one looks best to me, as the command doesn't overlapped with LAUNCHED. Wdyt?

Copy link
Collaborator

@Michaelvll Michaelvll Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the last one. Curious, why we don't add --help? That will explicitly telling the user it will show the helps (I think showing help without --help is a non-standard behavior reference).

Or we can reword it by Use spot jobs CLI that starts with: sky spot (or include a linke to the docs?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-12-01 at 09 02 52

Good point; how does this look now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, having the sentence below the spot jobs CLI hint does not read very smoothly.
Can the sentence be shortened and combined with the (autostopped if idle for 10 min), such as (autostopped if idle for 10 min, direct interaction is typically not needed)?

I think the overlapping of the sky spot --help with LAUNCHED should be fine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reordered the command hint and the 'not needed' sentence.

I thought about putting it inside the parens after 'if idle for 10min', but that could be understood as "direct interaction to stop the cluster".

@@ -97,9 +97,15 @@ 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 '
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: autostopped alone does not have a clear meaning to me. Not sure if other people have the same feeling.

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix @concretevitamin ! This will make the spot controller concept more clear to the user. Left a small nit.

Here is how it shows in light schema:
image

@Michaelvll
Copy link
Collaborator

Michaelvll commented Dec 1, 2022

Actually, spoke too soon, do you think having the hint after the table will look better? I found the two lines without left alignment look a bit weird to me.
image

@concretevitamin
Copy link
Member Author

Discussed with @Michaelvll: we decided to leave out "direct interaction is typically not needed" as it may seem contradictory to the controller being shown. We arrived at the current wording.

@concretevitamin concretevitamin merged commit 172f6e3 into master Dec 3, 2022
@concretevitamin concretevitamin deleted the ctrl branch December 3, 2022 04:40
iojw pushed a commit that referenced this pull request Feb 18, 2023
* Hints for spot controller in `sky status` output.

* Update hint.

* Update message.

* Reword

* Reorder

* pylint

* Reword

* Remnant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants