az ml online-deployment
Note
此参考是 Azure CLI(版本 2.15.0 或更高版本) 的 ml 扩展的一部分。 该扩展将在首次运行 az ml online-deployment 命令时自动安装。 了解更多关于扩展的信息。
管理 Azure ML 联机部署。
Azure ML 部署提供用于创建和管理模型部署的简单界面。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az ml online-deployment create |
创建部署。 如果部署已存在,它将失败。 如果要更新现有部署,请使用 az ml online-deployment update。 |
Extension | GA |
| az ml online-deployment delete |
删除部署。 |
Extension | GA |
| az ml online-deployment get-logs |
获取联机部署的容器日志。 |
Extension | GA |
| az ml online-deployment list |
列出部署。 |
Extension | GA |
| az ml online-deployment show |
显示部署。 |
Extension | GA |
| az ml online-deployment update |
更新部署。 |
Extension | GA |
az ml online-deployment create
创建部署。 如果部署已存在,它将失败。 如果要更新现有部署,请使用 az ml online-deployment update。
对于常规用途终结点,建议的最小计算 SKU Standard_DS3_v2。 在此处了解有关 SKU 的详细信息: https://free.blessedness.top/en-us/azure/machine-learning/reference-managed-online-endpoints-vm-sku-list.
az ml online-deployment create --file
--resource-group
--workspace-name
[--all-traffic]
[--endpoint-name]
[--local {false, true}]
[--local-enable-gpu {false, true}]
[--name]
[--no-wait]
[--package-model]
[--set]
[--skip-script-validation]
[--vscode-debug {false, true}]
[--web]
示例
从 YAML 规范文件创建部署
az ml online-deployment create --file deployment.yaml --resource-group my-resource-group --workspace-name my-workspace
必需参数
包含 Azure ML 联机部署规范的 YAML 文件的本地路径。 联机部署的 YAML 参考文档位于:https://aka.ms/ml-cli-v2-deployment-managed-online-yaml-reference,https://aka.ms/ml-cli-v2-deployment-kubernetes-online-yaml-reference。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure ML 工作区的名称。 可以使用 配置默认工作区 az configure --defaults workspace=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
在成功创建后,将终结点流量 100% 设置为此部署,不适用于 --no-wait。
| 属性 | 值 |
|---|---|
| 默认值: | False |
联机终结点的名称。
使用 Docker 在本地创建部署。 每个终结点只允许一个部署。 注意:如果指定的终结点不存在,则会创建它。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
为本地部署启用 GPU。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
部署的名称。
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
[这是预览版]从部署 yaml 创建打包环境,并使用打包环境进行部署。
| 属性 | 值 |
|---|---|
| 默认值: | False |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=value。
允许用户绕过部署评分脚本验证。
| 属性 | 值 |
|---|---|
| 默认值: | False |
创建本地终结点并附加 VSCode 调试器。 仅适用于 --local 标志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
在 Web 浏览器中的 Azure ML Studio 中显示部署的详细信息。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ml online-deployment delete
删除部署。
az ml online-deployment delete --endpoint-name
--name
--resource-group
--workspace-name
[--local {false, true}]
[--no-wait]
[--yes]
示例
使用确认删除部署
az ml online-deployment delete --name my-deployment --endpoint-name my-endpoint --yes --resource-group my-resource-group --workspace-name my-workspace
必需参数
联机终结点的名称。
部署的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure ML 工作区的名称。 可以使用 配置默认工作区 az configure --defaults workspace=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
从 Docker 环境中删除本地部署。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ml online-deployment get-logs
获取联机部署的容器日志。
az ml online-deployment get-logs --endpoint-name
--name
--resource-group
--workspace-name
[--container]
[--lines]
[--local {false, true}]
示例
获取联机部署的容器日志
az ml online-deployment get-logs --name my-deployment --endpoint-name my-endpoint --lines 100 --resource-group my-resource-group --workspace-name my-workspace
必需参数
联机终结点的名称。
部署的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure ML 工作区的名称。 可以使用 配置默认工作区 az configure --defaults workspace=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要从中检索日志的容器的类型。 允许的值:推理服务器、存储初始值设定项。
要尾部的最大行数。
| 属性 | 值 |
|---|---|
| 默认值: | 5000 |
从 Docker 环境中的本地部署获取日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ml online-deployment list
列出部署。
az ml online-deployment list --endpoint-name
--resource-group
--workspace-name
[--local {false, true}]
示例
列出终结点中的部署
az ml online-deployment list --endpoint-name my-endpoint --resource-group my-resource-group --workspace-name my-workspace
必需参数
终结点的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure ML 工作区的名称。 可以使用 配置默认工作区 az configure --defaults workspace=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
列出此本地终结点下的本地部署。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ml online-deployment show
显示部署。
az ml online-deployment show --endpoint-name
--name
--resource-group
--workspace-name
[--local {false, true}]
[--web]
示例
显示部署
az ml online-deployment show --name my-deployment --endpoint-name my-endpoint --resource-group my-resource-group --workspace-name my-workspace
必需参数
联机终结点的名称。
部署的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure ML 工作区的名称。 可以使用 配置默认工作区 az configure --defaults workspace=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
显示 Docker 环境中的本地部署。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
在 Web 浏览器中的 Azure ML Studio 中显示部署的详细信息。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ml online-deployment update
更新部署。
az ml online-deployment update --resource-group
--workspace-name
[--add]
[--endpoint-name]
[--file]
[--force-string]
[--local {false, true}]
[--local-enable-gpu {false, true}]
[--name]
[--no-wait]
[--remove]
[--set]
[--skip-script-validation]
[--vscode-debug {false, true}]
[--web]
示例
从 YAML 规范文件更新部署
az ml online-deployment update --file deployment.yaml --resource-group my-resource-group --workspace-name my-workspace
必需参数
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure ML 工作区的名称。 可以使用 配置默认工作区 az configure --defaults workspace=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | [] |
联机终结点的名称。
包含 Azure ML 联机部署规范的 YAML 文件的本地路径。 联机部署的 YAML 参考文档位于:https://aka.ms/ml-cli-v2-deployment-managed-online-yaml-reference,https://aka.ms/ml-cli-v2-deployment-kubernetes-online-yaml-reference。
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | False |
更新 Docker 环境中的本地部署。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
为本地部署启用 GPU。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
部署的名称。
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | [] |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | [] |
允许用户绕过部署评分脚本验证。
| 属性 | 值 |
|---|---|
| 默认值: | False |
更新本地终结点并重新附加 VSCode 调试器。 仅适用于 --local 标志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
在 Web 浏览器中的 Azure ML Studio 中显示部署的详细信息。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |