Skip to content

Commit

Permalink
[UX] Remove K80 and M60 from common GPU list (#4382)
Browse files Browse the repository at this point in the history
* Remove K80 and M60 from GPU list

* Fix kubernetes instance type with space

* comments

* format

* format

* remove mi25
  • Loading branch information
Michaelvll authored Nov 26, 2024
1 parent 6c9acac commit 13ce397
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
15 changes: 7 additions & 8 deletions sky/clouds/service_catalog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,8 @@ def get_common_gpus() -> List[str]:
'A100',
'A100-80GB',
'H100',
'K80',
'L4',
'M60',
'L40S',
'P100',
'T4',
'V100',
Expand All @@ -337,13 +336,13 @@ def get_common_gpus() -> List[str]:
def get_tpus() -> List[str]:
"""Returns a list of TPU names."""
# TODO(wei-lin): refactor below hard-coded list.
# There are many TPU configurations available, we show the three smallest
# and the largest configuration for the latest gen TPUs.
# There are many TPU configurations available, we show the some smallest
# ones for each generation, and people should find larger ones with
# sky show-gpus tpu.
return [
'tpu-v2-512', 'tpu-v3-2048', 'tpu-v4-8', 'tpu-v4-16', 'tpu-v4-32',
'tpu-v4-3968', 'tpu-v5litepod-1', 'tpu-v5litepod-4', 'tpu-v5litepod-8',
'tpu-v5litepod-256', 'tpu-v5p-8', 'tpu-v5p-32', 'tpu-v5p-128',
'tpu-v5p-12288'
'tpu-v2-8', 'tpu-v3-8', 'tpu-v4-8', 'tpu-v4-16', 'tpu-v4-32',
'tpu-v5litepod-1', 'tpu-v5litepod-4', 'tpu-v5litepod-8', 'tpu-v5p-8',
'tpu-v5p-16', 'tpu-v5p-32', 'tpu-v6e-1', 'tpu-v6e-4', 'tpu-v6e-8'
]


Expand Down
2 changes: 1 addition & 1 deletion sky/clouds/service_catalog/data_fetchers/fetch_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
'standardNVSv2Family': 'M60',
'standardNVSv3Family': 'M60',
'standardNVPromoFamily': 'M60',
'standardNVSv4Family': 'Radeon MI25',
'standardNVSv4Family': 'MI25',
'standardNDSFamily': 'P40',
'StandardNVADSA10v5Family': 'A10',
'StandardNCadsH100v5Family': 'H100',
Expand Down
10 changes: 8 additions & 2 deletions sky/provision/kubernetes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,11 @@ def name(self) -> str:
name = (f'{common_utils.format_float(self.cpus)}CPU--'
f'{common_utils.format_float(self.memory)}GB')
if self.accelerator_count:
name += f'--{self.accelerator_count}{self.accelerator_type}'
# Replace spaces with underscores in accelerator type to make it a
# valid logical instance type name.
assert self.accelerator_type is not None, self.accelerator_count
acc_name = self.accelerator_type.replace(' ', '_')
name += f'--{self.accelerator_count}{acc_name}'
return name

@staticmethod
Expand Down Expand Up @@ -1167,7 +1171,9 @@ def _parse_instance_type(
accelerator_type = match.group('accelerator_type')
if accelerator_count:
accelerator_count = int(accelerator_count)
accelerator_type = str(accelerator_type)
# This is to revert the accelerator types with spaces back to
# the original format.
accelerator_type = str(accelerator_type).replace('_', ' ')
else:
accelerator_count = None
accelerator_type = None
Expand Down

0 comments on commit 13ce397

Please sign in to comment.