Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure: Update fetcher to handle H100 missing prices. #2847

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions sky/clouds/service_catalog/data_fetchers/fetch_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,26 @@ def get_additional_columns(row):
axis='columns',
)

# As of Dec 2023, a few H100 instance types fetched from Azure APIs do not
# have pricing:
#
# df[df['InstanceType'].str.contains('H100')][['InstanceType', 'Price',
# 'SpotPrice']]
# InstanceType Price SpotPrice
# 5830 Standard_NC40ads_H100_v5 NaN NaN
# 5831 Standard_NC40ads_H100_v5 NaN NaN
# 5875 Standard_NC80adis_H100_v5 NaN NaN
# 5876 Standard_NC80adis_H100_v5 NaN NaN
# 5901 Standard_ND48s_H100_v5 NaN NaN
# 5910 Standard_ND96isr_H100_v5 117.984 29.4960
# 5911 Standard_ND96is_H100_v5 106.186 26.5465
#
# But these instance types are still launchable. We fill in $0 to enable
# launching.
h100_row_idx = df_ret['InstanceType'].str.contains('H100')
df_ret.loc[h100_row_idx, ['Price', 'SpotPrice']] = df_ret.loc[
h100_row_idx, ['Price', 'SpotPrice']].fillna(0)

before_drop_len = len(df_ret)
df_ret.dropna(subset=['InstanceType'], inplace=True, how='all')
after_drop_len = len(df_ret)
Expand Down