Skip to content

Commit

Permalink
Fix some issues about code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Conless committed Aug 22, 2024
1 parent 65303b3 commit ea12e4c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sky/clouds/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def check_disk_tier(
if disk_tier == resources_utils.DiskTier.HIGH or disk_tier == resources_utils.DiskTier.ULTRA:
return False, (
'Azure disk_tier={high, ultra} is not supported now. '
'Please use disk_tier={low, medium} instead.')
'Please use disk_tier={low, medium, best} instead.')
# Only S-series supported premium ssd
# see https://stackoverflow.com/questions/48590520/azure-requested-operation-cannot-be-performed-because-storage-account-type-pre # pylint: disable=line-too-long
if cls._get_disk_type(
Expand Down
2 changes: 1 addition & 1 deletion sky/clouds/oci.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def check_disk_tier(
return True, ''
if disk_tier == resources_utils.DiskTier.ULTRA:
return False, ('OCI disk_tier=ultra is not supported now. '
'Please use disk_tier={low, medium, high} instead.')
'Please use disk_tier={low, medium, high, best} instead.')
return True, ''

def get_credential_file_mounts(self) -> Dict[str, str]:
Expand Down
3 changes: 2 additions & 1 deletion sky/clouds/service_catalog/azure_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def get_default_instance_type(
_DEFAULT_INSTANCE_FAMILY)]

def _filter_disk_type(instance_type: str) -> bool:
return Azure.check_disk_tier(instance_type, disk_tier)[0]
valid, _ = Azure.check_disk_tier(instance_type, disk_tier)[0]
return valid

df = df.loc[df['InstanceType'].apply(_filter_disk_type)]
return common.get_instance_type_for_cpus_mem_impl(df, cpus,
Expand Down
3 changes: 2 additions & 1 deletion sky/clouds/service_catalog/oci_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def get_default_instance_type(
memory_gb_or_ratio = memory

def _filter_disk_type(instance_type: str) -> bool:
return OCI.check_disk_tier(instance_type, disk_tier)[0]
valid, _ = OCI.check_disk_tier(instance_type, disk_tier)
return valid

instance_type_prefix = tuple(
f'{family}' for family in oci_utils.oci_config.DEFAULT_INSTANCE_FAMILY)
Expand Down

0 comments on commit ea12e4c

Please sign in to comment.