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

Conversation

andylizf
Copy link
Contributor

@andylizf andylizf commented Oct 28, 2024

Enhance the formatting of logs shown after job creation for better readability and consistency with serve module's style, where:

skypilot/sky/serve/core.py

Lines 275 to 304 in c0c1748

sky_logging.print(
f'{fore.CYAN}Service name: '
f'{style.BRIGHT}{service_name}{style.RESET_ALL}'
f'\n{fore.CYAN}Endpoint URL: '
f'{style.BRIGHT}{endpoint}{style.RESET_ALL}'
f'\n📋 Useful Commands'
f'\n{ux_utils.INDENT_SYMBOL}To check service status:\t'
f'{ux_utils.BOLD}sky serve status {service_name} '
f'[--endpoint]{ux_utils.RESET_BOLD}'
f'\n{ux_utils.INDENT_SYMBOL}To teardown the service:\t'
f'{ux_utils.BOLD}sky serve down {service_name}'
f'{ux_utils.RESET_BOLD}'
f'\n{ux_utils.INDENT_SYMBOL}To see replica logs:\t'
f'{ux_utils.BOLD}sky serve logs {service_name} [REPLICA_ID]'
f'{ux_utils.RESET_BOLD}'
f'\n{ux_utils.INDENT_SYMBOL}To see load balancer logs:\t'
f'{ux_utils.BOLD}sky serve logs --load-balancer {service_name}'
f'{ux_utils.RESET_BOLD}'
f'\n{ux_utils.INDENT_SYMBOL}To see controller logs:\t'
f'{ux_utils.BOLD}sky serve logs --controller {service_name}'
f'{ux_utils.RESET_BOLD}'
f'\n{ux_utils.INDENT_SYMBOL}To monitor the status:\t'
f'{ux_utils.BOLD}watch -n10 sky serve status {service_name}'
f'{ux_utils.RESET_BOLD}'
f'\n{ux_utils.INDENT_LAST_SYMBOL}To send a test request:\t'
f'{ux_utils.BOLD}curl {endpoint}'
f'{ux_utils.RESET_BOLD}'
'\n\n' +
ux_utils.finishing_message('Service is spinning up and replicas '
'will be ready shortly.'))

@andylizf
Copy link
Contributor Author

@cblmemo PTAL, thanks!

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

LGTM! cc @Michaelvll for a quick look before merging.

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