Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cblmemo committed Jul 4, 2024
1 parent f0f4de8 commit 5e43834
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 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,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'
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 5e43834

Please sign in to comment.