Skip to content

Commit 0bdbd6b

Browse files
authored
Add warning for online deployment create operation to suggest the use of bigger SKU (Azure#28490)
1 parent 26f2c96 commit 0bdbd6b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/constants/_deployment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ class EndpointDeploymentLogContainerType(object):
2323
INFERENCE_SERVER_REST = "InferenceServer"
2424
INFERENCE_SERVER = "inference-server"
2525
STORAGE_INITIALIZER = "storage-initializer"
26+
27+
SmallSKUs = ["standard_ds1_v2", "standard_ds2_v2"]

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_online_deployment_operations.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from azure.ai.ml._utils._endpoint_utils import upload_dependencies, validate_scoring_script
2828
from azure.ai.ml._utils._logger_utils import OpsLogger
2929
from azure.ai.ml.constants._common import ARM_ID_PREFIX, AzureMLResourceType, LROConfigurations
30-
from azure.ai.ml.constants._deployment import EndpointDeploymentLogContainerType
30+
from azure.ai.ml.constants._deployment import EndpointDeploymentLogContainerType, SmallSKUs
3131
from azure.ai.ml.entities import OnlineDeployment
3232
from azure.ai.ml.exceptions import (
3333
ErrorCategory,
@@ -126,6 +126,13 @@ def begin_create_or_update(
126126
deployment=deployment,
127127
local_endpoint_mode=self._get_local_endpoint_mode(vscode_debug),
128128
)
129+
if (deployment and deployment.instance_type and deployment.instance_type.lower() in SmallSKUs):
130+
module_logger.warning(
131+
"Instance type %s may be too small for compute resources. " # pylint: disable=line-too-long
132+
"Minimum recommended compute SKU is Standard_DS3_v2 for general purpose endpoints. Learn more about SKUs here: " # pylint: disable=line-too-long
133+
"https://learn.microsoft.com/en-us/azure/machine-learning/referencemanaged-online-endpoints-vm-sku-list",
134+
deployment.instance_type # pylint: disable=line-too-long
135+
)
129136
if (
130137
not skip_script_validation
131138
and deployment

0 commit comments

Comments
 (0)