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

Added functionality to support specifying quantity of a resource in call to show-gpus #1924

Merged

Conversation

Saikrishna-Achalla
Copy link
Contributor

@Saikrishna-Achalla Saikrishna-Achalla commented May 2, 2023

This PR fixes issue #1915. Previously, users were not able to specify the GPU quantity that they wanted. This PR allows users to do so by running sky show-gpus V100:4 to find the cloud providers and regions that offer 4 V100 GPUs.

The output is now as follows:

sky show-gpus V100:8

GPU   QTY  CLOUD   INSTANCE_TYPE  DEVICE_MEM  vCPUs  HOST_MEM  HOURLY_PRICE  HOURLY_SPOT_PRICE  REGION            
V100  8    AWS     p3.16xlarge    16GB        64     488GB     $ 24.480      $ 7.344            ap-northeast-1    
V100  8    GCP     (attachable)   -           -      -         $ 19.840      $ 5.920            us-central1       
V100  8    Lambda  gpu_8x_v100    16GB        92     448GB     $ 4.400       -                  asia-northeast-1  

GPU        QTY  CLOUD  INSTANCE_TYPE       DEVICE_MEM  vCPUs  HOST_MEM  HOURLY_PRICE  HOURLY_SPOT_PRICE  REGION          
V100-32GB  8    AWS    p3dn.24xlarge       32GB        96     768GB     $ 31.212      $ 9.364            ap-northeast-1  
V100-32GB  8    Azure  Standard_ND40rs_v2  -           40     672GB     $ 22.032      $ 3.530            eastus

Failure output is as follows:

sky show-gpus V100:5

Resource 'V100' with quantity 5 not found. Try 'sky show-gpus --all' to show available accelerators and their quantities.

Tested (run the relevant ones):

  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

@romilbhardwaj romilbhardwaj self-requested a review May 2, 2023 01:30
Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @Saikrishna-Achalla! This is a great first step to implementing this feature. Left some comments.

I got a runaway Resource 'V100' with quantity 4 not found. Try 'sky show-gpus --all' to show available accelerators and their quantities. when I ran the command below. Is this expected?

(base) ➜  ~ sky show-gpus V100:4
*NOTE*: for most GCP accelerators, INSTANCE_TYPE == (attachable) means the host VM's cost is not included.

GPU   QTY  CLOUD  INSTANCE_TYPE       DEVICE_MEM  vCPUs  HOST_MEM  HOURLY_PRICE  HOURLY_SPOT_PRICE  REGION
V100  4    AWS    p3.8xlarge          16GB        32     244GB     $ 12.240      $ 3.672            ap-northeast-1
V100  4    Azure  Standard_NC24rs_v3  -           24     448GB     $ 13.460      $ 4.506            centralus
V100  4    Azure  Standard_NC24s_v3   -           24     448GB     $ 12.240      $ 4.097            centralus
V100  4    GCP    (attachable)        -           -      -         $ 9.920       $ 2.960            us-central1     Resource 'V100' with quantity 4 not found. Try 'sky show-gpus --all' to show available accelerators and their quantities.

sky/cli.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
@Michaelvll Michaelvll linked an issue May 9, 2023 that may be closed by this pull request
Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @Saikrishna-Achalla! Left some comments.

sky/cli.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
sky/clouds/service_catalog/__init__.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
sky/clouds/service_catalog/__init__.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Great work @Saikrishna-Achalla! Left some comments.

sky/cli.py Outdated Show resolved Hide resolved
sky/clouds/service_catalog/common.py Outdated Show resolved Hide resolved
sky/clouds/service_catalog/common.py Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

One final nit, otherwise good to go! Thanks for this contribution @Saikrishna-Achalla! 🚀

sky/cli.py Outdated Show resolved Hide resolved
@romilbhardwaj romilbhardwaj merged commit 410595d into skypilot-org:master May 24, 2023
29 of 30 checks passed
@romilbhardwaj romilbhardwaj mentioned this pull request May 24, 2023
8 tasks
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.

[show-gpus] GPU count doesn't work with sky show-gpus
2 participants