如何使用Azure Machine Learning CLI (v2) 创建并发布管道端点?
Azure ML CLI (v2) 创建并发布管道端点方法
一、直接通过CLI命令创建管道端点
使用az ml pipeline-endpoint create命令可直接创建管道端点,核心参数说明:
--name:指定管道端点的唯一名称--pipeline-job:关联已提交成功的管道作业ID(或作业名称),作为端点的默认执行版本--description:可选,添加端点的描述信息
示例命令:
az ml pipeline-endpoint create --name my-batch-pipeline-endpoint --pipeline-job abc123-pipeline-job-id --description "批量数据预处理管道端点"
二、通过YAML配置文件创建管道端点
创建名为pipeline-endpoint-def.yaml的配置文件,内容如下:
$schema: https://azuremlschemas.azureedge.net/latest/pipelineEndpoint.schema.json name: my-batch-pipeline-endpoint description: 批量数据预处理管道端点 defaults: pipeline_job: abc123-pipeline-job-id # 替换为你的管道作业ID或名称
执行创建命令:
az ml pipeline-endpoint create --file pipeline-endpoint-def.yaml
三、发布新管道版本到已有端点
如果需要更新端点的默认执行版本,使用az ml pipeline-endpoint update命令:
az ml pipeline-endpoint update --name my-batch-pipeline-endpoint --add-default-pipeline-job new-pipeline-job-id
或通过YAML更新,修改上述pipeline-endpoint-def.yaml中的pipeline_job值后执行:
az ml pipeline-endpoint update --file pipeline-endpoint-def.yaml
四、调用管道端点触发作业
创建完成后,可直接通过端点触发管道作业:
az ml pipeline-job create --endpoint-name my-batch-pipeline-endpoint
内容的提问来源于stack exchange,提问作者alif shaikh
相关产品推荐
相关产品推荐

