From ccd9b90578e46a4bf77bc6e725c82d2d33a8a064 Mon Sep 17 00:00:00 2001 From: Tian Xia Date: Fri, 5 Jul 2024 00:33:21 +0800 Subject: [PATCH] [Catalog] Remove fractional A10 instance types in catalog (#3722) * fix * Update sky/clouds/service_catalog/data_fetchers/fetch_azure.py Co-authored-by: Zhanghao Wu * change todo name --------- Co-authored-by: Zhanghao Wu --- .../service_catalog/data_fetchers/fetch_azure.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sky/clouds/service_catalog/data_fetchers/fetch_azure.py b/sky/clouds/service_catalog/data_fetchers/fetch_azure.py index cc5e45977480..9a7b2a90beeb 100644 --- a/sky/clouds/service_catalog/data_fetchers/fetch_azure.py +++ b/sky/clouds/service_catalog/data_fetchers/fetch_azure.py @@ -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' @@ -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]