Share via


StepSequence クラス

Pipeline 内のステップの一覧と、それらの実行順序を表します。

パイプラインの初期化時に StepSequence を使用して、特定の順序で実行するステップを含むワークフローを作成します。

StepSequence を初期化します。

継承
builtins.object
StepSequence

コンストラクター

StepSequence(steps=None)

パラメーター

steps
list
既定値: None

StepSequence のステップ。

steps
list
必須

StepSequence の手順。

注釈

StepSequence を使用すると、PipelineData を使用してデータ依存関係を指定することなく、特定の順序でステップを簡単に実行できます。

StepSequence を使用してパイプラインを構築する例を次に示します。


   from azureml.pipeline.core import Pipeline, StepSequence
   from azureml.pipeline.steps import PythonScriptStep

   prepare_step = PythonScriptStep(
       name='prepare data step',
       script_name="prepare_data.py",
       compute_target=compute
   )

   train_step = PythonScriptStep(
       name='train step',
       script_name="train.py",
       compute_target=compute
   )

   step_sequence = StepSequence(steps=[prepare_step, train_step])
   pipeline = Pipeline(workspace=ws, steps=step_sequence)

この例では、prepare_step の実行が正常に完了するまで train_step が実行されません。

3 つのステップを並行して実行してから、4 つ目のステップにフィードするには、次の手順を実行します。


   initial_steps = [step1, step2, step3]
   all_steps = StepSequence(steps=[initial_steps, step4])
   pipeline = Pipeline(workspace=ws, steps=all_steps)