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] Allow different prices in a same region #3838

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 11 additions & 1 deletion sky/clouds/service_catalog/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,17 @@ def get_hourly_cost_impl(
price_str = 'Price'
# For AWS/Azure/GCP on-demand instances, the price is the same across
# all the zones in the same region.
assert region is None or len(set(df[price_str])) == 1, df
# We do not assert this as for Azure, it seems we can have different
# prices for specific instance types in the same region. This is to
# unblock our users from using those specific instance types:
# Standard_D2as_v5, Standard_D2ads_v5
# TODO(Tian): investigate this.
if region is not None and len(set(df[price_str])) > 1:
logger.debug(f'Found multiple prices for instance type '
f'{instance_type!r} in region {region!r}. '
'This is unexpected. Please report this to the '
'SkyPilot team.')
# assert region is None or len(set(df[price_str])) == 1, df

if pd.isna(df[price_str]).all():
with ux_utils.print_exception_no_traceback():
Expand Down
Loading