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

[Catalog] Add TPU V6e. #4218

Merged
merged 2 commits into from
Oct 30, 2024
Merged

[Catalog] Add TPU V6e. #4218

merged 2 commits into from
Oct 30, 2024

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Oct 30, 2024

This PR adds hardcoded TPU V6e price to our catalog. Currently, TPU V6e is not in GPC SKUs, so we use the pricing in GCP TPU Pricing first.

There are some missing zones in the pricing page and I set their price to 0.0 so user can launch on those regions.

The hardcode catalog is generated by this script:

zones = ['us-east5-b', 'us-east5-c', 'us-south1-a', 'europe-west4-a', 'us-central1-c', 'us-south1-c', 'us-central1-b', 'asia-northeast1-b', 'us-east1-d', 'us-central2-b']
acc_nums = [1, 4, 8, 16, 32, 64, 128, 256]
region2price = {
    'us-east1': 2.7,
    'us-east5': 2.7,
    'europe-west4': 2.97,
    'asia-northeast1': 3.24,
}

no_pricing_info_region = set()

for n in acc_nums:
    acc_name = f'tpu-v6e-{n}'
    for z in zones:
        r = '-'.join(z.split('-')[:-1])
        if r not in region2price:
            no_pricing_info_region.add(r)
            continue
        p = region2price[r] * n
        print(f' ,{acc_name},1,,,{acc_name},{p},,{r},{z}')

print(no_pricing_info_region)

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • python -m sky.clouds.service_catalog.data_fetchers.fetch_gcp --single-threaded --all-regions
  • 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: conda deactivate; bash -i tests/backward_compatibility_tests.sh

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Awesome @cblmemo! Thanks for the quick fix!

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

cblmemo commented Oct 30, 2024

All region catalog fetching passed. Merging now!

@cblmemo cblmemo added this pull request to the merge queue Oct 30, 2024
Merged via the queue into master with commit 276035b Oct 30, 2024
20 checks passed
@cblmemo cblmemo deleted the tpu-v6e-catalog branch October 30, 2024 22:41
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