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] Bump catalog schema version #4470

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sky/clouds/service_catalog/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Constants used for service catalog."""
HOSTED_CATALOG_DIR_URL = 'https://raw.githubusercontent.com/skypilot-org/skypilot-catalog/master/catalogs' # pylint: disable=line-too-long
CATALOG_SCHEMA_VERSION = 'v5'
CATALOG_SCHEMA_VERSION = 'v6'
CATALOG_DIR = '~/.sky/catalogs'
ALL_CLOUDS = ('aws', 'azure', 'gcp', 'ibm', 'lambda', 'scp', 'oci',
'kubernetes', 'runpod', 'vsphere', 'cudo', 'fluidstack',
Expand Down
4 changes: 3 additions & 1 deletion sky/clouds/service_catalog/gcp_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ def get_instance_type_for_accelerator(

if acc_name in _ACC_INSTANCE_TYPE_DICTS:
df = _df[_df['InstanceType'].notna()]
instance_types = _ACC_INSTANCE_TYPE_DICTS[acc_name][acc_count]
instance_types = _ACC_INSTANCE_TYPE_DICTS[acc_name].get(acc_count, None)
if instance_types is None:
return None, []
Comment on lines +295 to +297
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still need catalog schema bump if we use .get(acc_count, None)? won't it work with v5?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, since this changes will not affect the old SkyPilot version, we have to bump the catalog version to ensure old skypilot release can work. We add this get for future proof. : )

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh nvm, I think I understand - we still need the catalog version bump for back compat.

df = df[df['InstanceType'].isin(instance_types)]

# Check the cpus and memory specified by the user.
Expand Down
Loading