【发布时间】:2019-12-08 20:53:26
【问题描述】:
我有一个 Azure Pipeline Build。 *.yaml 文件正确执行 Python 脚本 (PythonScript@0)。此脚本本身创建(如果不存在)、执行和发布 Azure ML 管道。在手动执行 Build 或由提交触发时,它运行良好。
但我想安排每天自动执行 ML 管道(Python 脚本)。
我尝试了以下方法:
pipeline_id = published_pipeline.id
recurrence = ScheduleRecurrence(frequency="Day", interval=1)
recurring_schedule = Schedule.create(ws,
name=<schedule_name>,
description="Title",
pipeline_id=pipeline_id,
experiment_name=<experiment_name>,
recurrence=recurrence)
在这种情况下,管道会在 3-4 秒内运行并成功终止。但是,不会执行 Python 脚本。
另外,我尝试使用 Build 来安排管道的执行,但我认为这是一种错误的方法。它重建了一个管道,但我需要执行之前发布的管道。
schedules:
- cron: "0 0 * * *"
displayName: Daily build
always: true
如何每天执行我发布的管道?我应该使用 Release(哪些代理,哪些任务?)?
【问题讨论】:
-
Also, I tried to schedule the execution of a pipeline using Build, but I assume that it is a wrong approach. It rebuilds a pipeline, but I need to execute a previously published pipeline.您好,您的构建管道中的步骤和任务是什么?如果您尝试安排每天执行 python 脚本,您可以选择安排执行构建管道或创建新管道来执行 python 脚本。 -
你说python脚本没有执行?你的意思是 PythonScript 任务没有被执行?您能否检查一下 ML 管道是否已正确创建并发布到 azure。您可以尝试手动将计划的 ML 管道发布到 azure 以检查计划是否有效。
标签: azure-devops azure-pipelines azure-pipelines-release-pipeline azure-pipelines-build-task