如何在 Azure 机器学习管道中组织一个接一个的步骤?

How to organize one step after another in Azure Machine Learning Pipelines?

我已经通过三个步骤定义了一个 Azure 机器学习管道:

e2e_steps=[etl_model_step, train_model_step, evaluate_model_step]
e2e_pipeline = Pipeline(workspace=ws, steps = e2e_steps)

想法是运行给定序列中的管道:

  1. etl_model_step
  2. train_model_step
  3. evaluate_model_step

但是,我的实验失败了,因为它试图在 train_model_step 之前执行 evaluate_model_step:

如何强制执行顺序?

azureml.pipeline.core.StepSequence 让你做到这一点。

A StepSequence can be used to easily run steps in a specific order, without needing to specify data dependencies through the use of PipelineData.

请参阅 the docs 了解更多信息。

但是,让步骤 运行 有序的更好方法是通过 PipelineDataOutputFileDatasetConfig 将它们拼接在一起。在您的示例中,train_step 是否取决于 etl step 的输出?如果是这样,请考虑让步骤按顺序 运行 的方式进行。有关详细信息,请参阅 this tutorial 了解更多信息