From 5e43834910c52462145c50c2e64201e990d21f01 Mon Sep 17 00:00:00 2001 From: cblmemo Date: Wed, 3 Jul 2024 17:51:52 -0700 Subject: [PATCH] fix --- .../service_catalog/data_fetchers/fetch_azure.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sky/clouds/service_catalog/data_fetchers/fetch_azure.py b/sky/clouds/service_catalog/data_fetchers/fetch_azure.py index cc5e4597748..ff8816db952 100644 --- a/sky/clouds/service_catalog/data_fetchers/fetch_azure.py +++ b/sky/clouds/service_catalog/data_fetchers/fetch_azure.py @@ -93,6 +93,13 @@ 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 filter them out +# here to avoid using it as a whole A10 GPU and causing memory out of capacity. +# 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 +293,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]