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

Some GCP catalog prices seem inaccurate #31

Open
hzeng-0 opened this issue Jun 5, 2023 · 4 comments
Open

Some GCP catalog prices seem inaccurate #31

hzeng-0 opened this issue Jun 5, 2023 · 4 comments

Comments

@hzeng-0
Copy link
Contributor

hzeng-0 commented Jun 5, 2023

The price for GCP's A2 vms on our catalog seem significantly different from how they are listed on https://cloud.google.com/compute/vm-instance-pricing.

For example, a2-highgpu-1g has an hourly on-demand price of $4.05, but our catalog puts it at $0.94.

I'm not sure if this discrepancy is only for the A2 machines, or if it is more widespread.

Also, on a side note, how do we generate the catalog for GCP? I tried running python3 fetch_gcp.py in skypilot/sky/clouds/service_catalog/data_fetchers, but this gave me an error.

@Michaelvll
Copy link
Collaborator

Hey, thank you for the question @hzeng-0 ! This price difference is expected as we separate the price for the a2-highgpu-1g to two parts: the host machine a2-highgpu-1g and the A100 GPU (There are also prices for A100 GPU in the catalog) to make it align with the other kind of GPUs.

The two prices will be added together when we actually do the cost optimization for the resource. If you do sky launch --cloud gcp --gpus A100, you should be able to see the aggregated price.

@hzeng-0
Copy link
Contributor Author

hzeng-0 commented Jun 6, 2023

I see, that makes a lot more sense. Thanks @Michaelvll !!

Is running python3 fetch_gcp.py the appropriate way to generate the catalog?

@Michaelvll
Copy link
Collaborator

Yes! Running python -m sky.clouds.service_catalog.data_fetchers.fetch_gcp should fetch the catalog from GCP. The detailed instructions can be found here: http://localhost:8000/html/reference/faq.html#advanced-how-to-make-skypilot-use-all-global-regions

Please let us know if there is any issue with that. : )

@hzeng-0
Copy link
Contributor Author

hzeng-0 commented Jun 8, 2023

I'm not sure why yet, but when I run it I get

...(bunch of "Fetching machine types for zone xyz")
Fetching machine types for zone 'us-west4-b'...
Fetching machine types for zone 'us-west4-c'...
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/site-packages/sky/clouds/service_catalog/data_fetchers/fetch_gcp.py", line 160, in _get_machine_type_for_zone
    machine_types_response = machine_types_request.execute()
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/site-packages/googleapiclient/http.py", line 923, in execute
    resp, content = _retry_request(
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/site-packages/googleapiclient/http.py", line 222, in _retry_request
    raise exception
...(bunch of lines)
  File "/home/zeng/miniconda3/envs/sky/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2635)

Weirdly, the errors disappear when I get rid of the multiprocesssing in fetch_gcp.py (replacing pool.map with list comprehensions where possible).

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

No branches or pull requests

2 participants