AksEndpointDeploymentConfiguration 类
表示部署在 Azure Kubernetes 服务上的服务的部署配置信息。
使用 AksEndpoint 类的 deploy_configuration 方法创建 AksEndpointDeploymentConfiguration 对象。
- 继承
-
AksEndpointDeploymentConfiguration
构造函数
AksEndpointDeploymentConfiguration(autoscale_enabled, autoscale_min_replicas, autoscale_max_replicas, autoscale_refresh_seconds, autoscale_target_utilization, collect_model_data, auth_enabled, cpu_cores, memory_gb, enable_app_insights, scoring_timeout_ms, replica_max_concurrent_requests, max_request_wait_time, num_replicas, primary_key, secondary_key, tags, properties, description, gpu_cores, period_seconds, initial_delay_seconds, timeout_seconds, success_threshold, failure_threshold, namespace, token_auth_enabled, version_name, traffic_percentile, compute_target_name, cpu_cores_limit, memory_gb_limit)
参数
- replica_max_concurrent_requests
- int
允许用于此 Webservice 的每个副本的最大并发请求数。 默认值为 1。 除非获得 Microsoft 技术支持人员或 Azure 机器学习团队成员的指导,否则不要更改此设置的默认值 1。
- namespace
- str
要在其中部署此 Web 服务的 Kubernetes 命名空间:最多 63 个小写字母数字(“a”-“z”、“0”-“9”)和连字符(“-”)。 第一个和最后一个字符不能为连字符。
- token_auth_enabled
- bool
是否为此 Webservice 启用 Azure Active Directory 身份验证。 如果启用此功能,则用户可以通过使用其 Azure Active Directory 凭据提取访问令牌来访问此 Webservice。 默认为 False。
- memory_gb_limit
变量
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.autoscale_enabled
是否为此 Web 服务启用自动缩放。 如果 num_replicas 为“无”,则默认为 True。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.autoscale_min_replicas
自动缩放此 Webservice 时要使用的容器的最小数目。 默认值为 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.autoscale_max_replicas
自动缩放此 Webservice 时要使用的容器的最大数目。 默认值为 10。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.autoscale_refresh_seconds
自动缩放程序应尝试缩放此 Webservice 的频率。 默认值为 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.autoscale_target_utilization
自动缩放程序应尝试维持此 Webservice 的目标利用率(以低于 100 的百分比表示)。 默认值为 70。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.collect_model_data
是否为此 Webservice 启用模型数据收集。 默认为 False。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.auth_enabled
是否为此 Webservice 启用身份验证。 默认为 true。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.cpu_cores
要分配给此 Webservice 的 CPU 核心数。 可以是小数。 默认值为 0.1
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.memory_gb
为此 Webservice 分配的内存量 (GB)。 可以是小数。 默认值为 0.5
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.enable_app_insights
是否为此 Webservice 启用 Application Insights 日志记录。 默认为 False。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.scoring_timeout_ms
对此 Webservice 的评分调用强制执行的超时时间。 默认值为 60000。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.replica_max_concurrent_requests
允许用于此 Webservice 的每个副本的最大并发请求数。 默认值为 1。 除非获得 Microsoft 技术支持人员或 Azure 机器学习团队成员的指导,否则不要更改此设置的默认值 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.max_request_wait_time
在返回 503 错误之前,请求将在队列中停留的最长时间(以毫秒为单位)。 默认为 500。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.num_replicas
要分配给此 Webservice 的容器数量。 无默认值,如果未设置此参数,则默认启用自动缩放程序。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.primary_key
要用于此 Web 服务的主要身份验证密钥
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.secondary_key
要用于此 Web 服务的辅助身份验证密钥
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.tags
提供此 Web 服务的键值标记的字典
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.properties
提供此 Web 服务的键值属性的字典。 这些属性在部署后无法更改,但是可以添加新的键值对。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.description
提供此 Webservice 的说明。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.gpu_cores
要分配给此 Web 服务的 GPU 核心数。 默认值为 0。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.period_seconds
执行运行情况探测的频率(秒)。 默认值为 10 秒。 最小值为 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.initial_delay_seconds
启动容器后,启动运行情况探测前的秒数。 默认值为 310。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.timeout_seconds
运行情况探测超时前等待的秒数。默认值为 2 秒。 最小值为 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.success_threshold
失败后,运行情况探测被视为成功的最小连续成功次数。 默认值为 1。 最小值为 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.failure_threshold
当 Pod 启动而运行情况探测失败时,Kubernetes 将尝试 failureThreshold 次才会放弃。 默认值为 3。 最小值为 1。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.namespace
要在其中部署此 Web 服务的 Kubernetes 命名空间:最多 63 个小写字母数字(“a”-“z”、“0”-“9”)和连字符(“-”)。 第一个和最后一个字符不能为连字符。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.token_auth_enabled
是否为此 Webservice 启用 Azure Active Directory 身份验证。 如果启用此功能,则用户可以通过使用其 Azure Active Directory 凭据提取访问令牌来访问此 Webservice。 默认为 False。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.version_name
终结点中版本的名称。
- azureml.core.webservice.aks.AksEndpointDeploymentConfiguration.traffic_percentile
版本在终结点中接收的流量。
方法
| validate_endpoint_configuration |
检查指定的配置值是否有效。 如果验证失败,将引发 WebserviceException。 |
validate_endpoint_configuration
检查指定的配置值是否有效。
如果验证失败,将引发 WebserviceException。
validate_endpoint_configuration()
例外
反馈
提交和查看相关反馈