适用于:
Azure CLI ml 扩展 v2(当前版本)
源 JSON 架构可在
https://azuremlschemas.azureedge.net/latest/batchDeployment.schema.json
中找到。
本文档中详细介绍的 YAML 语法基于最新版本的 ML CLI v2 扩展的 JSON 架构。 此语法必定仅适用于最新版本的 ML CLI v2 扩展。
可以在
https://azuremlschemasprod.azureedge.net/
上查找早期扩展版本的架构。
YAML 语法
error_threshold
应忽略的文件失败次数。 如果整个输入的错误计数超出此值,则批量评分作业将终止。
error_threshold
用于整个输入,而不是单独的小批量。 如果省略,则允许出现任意数目的文件失败次数,而不会终止作业。
logging_level
日志详细程度。
warning
,
info
,
debug
mini_batch_size
code_configuration.scoring_script
可以在一次
run()
调用中处理的文件数。
retry_settings
object
用于对每个小批量进行评分的重试设置。
YAML:基本 (MLflow)
$schema: https://azuremlschemas.azureedge.net/latest/batchDeployment.schema.json
name: nyc-taxi-mlflow-dpl
endpoint_name: nyc-taxi-batch
model:
path: nyc-taxi/model
compute: azureml:batch-cluster
YAML:自定义模型和评分代码
$schema: https://azuremlschemas.azureedge.net/latest/batchDeployment.schema.json
name: mnist-torch-dpl
description: A deployment using Torch to solve the MNIST classification dataset.
endpoint_name: mnist-batch
model:
path: ./mnist/model/
code_configuration:
code: ./mnist/code/
scoring_script: batch_driver.py
environment:
conda_file: ./mnist/environment/conda.yml
image: mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04:latest
compute: azureml:batch-cluster
resources:
instance_count: 1
max_concurrency_per_instance: 2
mini_batch_size: 10
output_action: append_row
output_file_name: predictions.csv
retry_settings:
max_retries: 3
timeout: 30
error_threshold: -1
logging_level: info
安装并使用 CLI (v2)