ResourceRequirementsSettings Class
Resource requirements settings for a container.
- Inheritance
-
azure.ai.ml.entities._mixins.RestTranslatableMixinResourceRequirementsSettings
Constructor
ResourceRequirementsSettings(requests: ResourceSettings | None = None, limits: ResourceSettings | None = None)
Parameters
Name | Description |
---|---|
requests
|
The minimum resource requests for a container. Default value: None
|
limits
|
The resource limits for a container. Default value: None
|
Examples
Configuring ResourceRequirementSettings for a Kubernetes deployment.
from azure.ai.ml.entities import (
CodeConfiguration,
KubernetesOnlineDeployment,
ResourceRequirementsSettings,
ResourceSettings,
)
blue_deployment = KubernetesOnlineDeployment(
name="kubernetes_deployment",
endpoint_name="online_endpoint_name",
model=load_model("./sdk/ml/azure-ai-ml/tests/test_configs/model/model_with_stage.yml"),
environment="azureml:AzureML-Minimal:1",
code_configuration=CodeConfiguration(
code="endpoints/online/model-1/onlinescoring", scoring_script="score.py"
),
instance_count=1,
resources=ResourceRequirementsSettings(
requests=ResourceSettings(
cpu="500m",
memory="0.5Gi",
),
limits=ResourceSettings(
cpu="1",
memory="1Gi",
),
),
)
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for Python