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

print cloud info in cluster status #1209

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

BelSasha
Copy link
Contributor

@BelSasha BelSasha commented Aug 28, 2024

Output will looks as follows:

Single-node GPU
imageAWS g5.xlarge cluster | 🌍 us-east-1 | 💰 $1.006/hr

Multi-node GPU
image2x AWS g5.xlarge cluster | 🌍 us-east-1 | 💰 $1.006/hr

Single-node CPU
image AWS m6i.xlarge cluster | 🌍 us-east-1 | :💸: $0.096/hr

Multi-node CPU
image 2x AWS m6i.xlarge cluster | 🌍 us-east-1 | :💸: $0.096/hr

@BelSasha BelSasha marked this pull request as ready for review August 28, 2024 14:25
Copy link
Contributor Author

BelSasha commented Aug 28, 2024

@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch 5 times, most recently from 852c2b8 to 07bac3e Compare August 29, 2024 10:09
if cloud_properties:
properties_to_check = ["cloud", "instance_type", "region", "cost_per_hour"]
for p in properties_to_check:
property_value = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about the cloud property necessitates this?

Copy link
Contributor Author

@BelSasha BelSasha Sep 1, 2024

Choose a reason for hiding this comment

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

We could add a validation for the launched_properties in the status output, but i think it is more of a den test.
The point of test is to make sure that the cloud info is printed as expected to stdout.
@jlewitt1 is this what you were referencing to? Or something else?

Copy link
Collaborator

Choose a reason for hiding this comment

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

i meant what makes cloud differnt from the other properties, but seems like it's just bc of how Sky formats it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, i think so. We could also double check it with Caroline.

Copy link
Collaborator

@carolineechen carolineechen Sep 4, 2024

Choose a reason for hiding this comment

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

you added this line cloud = cloud_properties.get("cloud").upper() in _print_cloud_properties. I think this might be in response to me adding the cloud = str(launched_resource.cloud).lower() in setting the launched properties cloud attribute?

In the sky status resource, they have the cloud capitalized (Kubernetes, AWS, GCP, Lambda, etc) but I thought it simpler to just use the lowercase form (since that's what we prefer/use in our examples anyways). I think we can leave it that way for printing out in status too? But if we want the original form then we should update the launched_properties attribute to that too. Since calling upper() doesn't work in every case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@carolineechen sounds good, I don't have strong opinion about that. If lower case is consistent with out examples, let's print the cloud in the status as lower case as well. :)

@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from 07bac3e to a6f81bb Compare September 1, 2024 11:44
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch 4 times, most recently from 010f8de to 0987928 Compare September 4, 2024 10:45
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch 2 times, most recently from 5284e6d to edda744 Compare September 4, 2024 14:43
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from edda744 to 649d5ee Compare September 5, 2024 07:00
@BelSasha BelSasha merged commit db8c290 into main Sep 5, 2024
12 checks passed
@BelSasha BelSasha deleted the sb/status-cli-print-cloud-proparties branch September 5, 2024 13:55
BelSasha added a commit that referenced this pull request Sep 17, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
BelSasha added a commit that referenced this pull request Sep 17, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
BelSasha added a commit that referenced this pull request Sep 18, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
BelSasha added a commit that referenced this pull request Sep 18, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
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.

3 participants