Skip to content

Commit

Permalink
Add warning for online deployment create operation to suggest the use…
Browse files Browse the repository at this point in the history
… of bigger SKU (#28490)
  • Loading branch information
nancy-mejia authored Jan 27, 2023
1 parent 26f2c96 commit 0bdbd6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sdk/ml/azure-ai-ml/azure/ai/ml/constants/_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ class EndpointDeploymentLogContainerType(object):
INFERENCE_SERVER_REST = "InferenceServer"
INFERENCE_SERVER = "inference-server"
STORAGE_INITIALIZER = "storage-initializer"

SmallSKUs = ["standard_ds1_v2", "standard_ds2_v2"]
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from azure.ai.ml._utils._endpoint_utils import upload_dependencies, validate_scoring_script
from azure.ai.ml._utils._logger_utils import OpsLogger
from azure.ai.ml.constants._common import ARM_ID_PREFIX, AzureMLResourceType, LROConfigurations
from azure.ai.ml.constants._deployment import EndpointDeploymentLogContainerType
from azure.ai.ml.constants._deployment import EndpointDeploymentLogContainerType, SmallSKUs
from azure.ai.ml.entities import OnlineDeployment
from azure.ai.ml.exceptions import (
ErrorCategory,
Expand Down Expand Up @@ -126,6 +126,13 @@ def begin_create_or_update(
deployment=deployment,
local_endpoint_mode=self._get_local_endpoint_mode(vscode_debug),
)
if (deployment and deployment.instance_type and deployment.instance_type.lower() in SmallSKUs):
module_logger.warning(
"Instance type %s may be too small for compute resources. " # pylint: disable=line-too-long
"Minimum recommended compute SKU is Standard_DS3_v2 for general purpose endpoints. Learn more about SKUs here: " # pylint: disable=line-too-long
"https://learn.microsoft.com/en-us/azure/machine-learning/referencemanaged-online-endpoints-vm-sku-list",
deployment.instance_type # pylint: disable=line-too-long
)
if (
not skip_script_validation
and deployment
Expand Down

0 comments on commit 0bdbd6b

Please sign in to comment.