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

feat: 🎸 Add --zones and --exclude flag to fetch_gcp #2562

Merged
merged 8 commits into from
Sep 21, 2023

Conversation

sunny0826
Copy link
Contributor

✅ Closes: #2555

Add --zones and --exclude flag to fetch_gcp.

--zones: Fetch the list of specified zones.
--exclude: Exclude the list of specified regions.

Copy link
Collaborator

@iojw iojw left a comment

Choose a reason for hiding this comment

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

Thank you @sunny0826 for the contribution again! Left some comments.

sky/clouds/service_catalog/data_fetchers/fetch_gcp.py Outdated Show resolved Hide resolved
sky/clouds/service_catalog/data_fetchers/fetch_gcp.py Outdated Show resolved Hide resolved
@iojw
Copy link
Collaborator

iojw commented Sep 20, 2023

python sky/clouds/service_catalog/data_fetchers/fetch_gcp.py --zones us-west2-a will throw an error because df is empty.

You may need to add the empty dataframe check to get_gpu_df and potentially get_vm_df as well. Could you test for similar bugs like this and fix them?

@sunny0826
Copy link
Contributor Author

python sky/clouds/service_catalog/data_fetchers/fetch_gcp.py --zones us-west2-a will throw an error because df is empty.

You may need to add the empty dataframe check to get_gpu_df and potentially get_vm_df as well. Could you test for similar bugs like this and fix them?

I realized that only the relevant GPU information was not found in that Zone, not the VM information, so I added the check to get_gpu_df and threw an error.

@iojw
Copy link
Collaborator

iojw commented Sep 20, 2023

If there are no GPUs for a given zone, I think we still want to include both the VM and TPU information, instead of erroring.

@sunny0826
Copy link
Contributor Author

Well, I added checks to both get_gpu_df and get_vm_df.

Copy link
Collaborator

@iojw iojw left a comment

Choose a reason for hiding this comment

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

Thank you for the effort @sunny0826! This is good to go (just made a minor edit for the comments as discussed).

@iojw iojw merged commit b6fc1ec into skypilot-org:master Sep 21, 2023
18 checks passed
@sunny0826 sunny0826 deleted the feat/fetch-gcp-flag branch September 22, 2023 00:21
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.

[GCP] Add --regions and --exclude flag to fetch_gcp
2 participants