Skip to content

Commit

Permalink
[Catalog] Remove fractional A10 instance types in catalog (#3722)
Browse files Browse the repository at this point in the history
* fix

* Update sky/clouds/service_catalog/data_fetchers/fetch_azure.py

Co-authored-by: Zhanghao Wu <[email protected]>

* change todo name

---------

Co-authored-by: Zhanghao Wu <[email protected]>
  • Loading branch information
cblmemo and Michaelvll committed Aug 23, 2024
1 parent 0885597 commit ccd9b90
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sky/clouds/service_catalog/data_fetchers/fetch_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ def get_regions() -> List[str]:
# We have to manually remove it.
DEPRECATED_FAMILIES = ['standardNVSv2Family']

# Some A10 instance types only contains a fractional of GPU. We temporarily
# filter them out here to avoid using it as a whole A10 GPU.
# TODO(zhwu,tian): support fractional GPUs, which can be done on
# kubernetes as well.
# Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/nva10v5-series
FILTERED_A10_INSTANCE_TYPES = [
f'Standard_NV{vcpu}ads_A10_v5' for vcpu in [6, 12, 18]
]

USEFUL_COLUMNS = [
'InstanceType', 'AcceleratorName', 'AcceleratorCount', 'vCPUs', 'MemoryGiB',
'GpuInfo', 'Price', 'SpotPrice', 'Region', 'Generation'
Expand Down Expand Up @@ -286,6 +295,10 @@ def get_additional_columns(row):
after_drop_len = len(df_ret)
print(f'Dropped {before_drop_len - after_drop_len} duplicated rows')

# Filter out instance types that only contain a fractional of GPU.
df_ret = df_ret.loc[~df_ret['InstanceType'].isin(FILTERED_A10_INSTANCE_TYPES
)]

# Filter out deprecated families
df_ret = df_ret.loc[~df_ret['family'].isin(DEPRECATED_FAMILIES)]
df_ret = df_ret[USEFUL_COLUMNS]
Expand Down

0 comments on commit ccd9b90

Please sign in to comment.