다음을 통해 공유


StepSequence 클래스

Pipeline의 단계 목록과 그러한 단계를 실행할 순서를 나타냅니다.

파이프라인을 초기화할 때 StepSequence를 사용하여 특정 순서로 실행할 단계가 포함된 워크플로를 생성합니다.

StepSequence를 초기화합니다.

상속
builtins.object
StepSequence

생성자

StepSequence(steps=None)

매개 변수

steps
list
기본값: None

StepSequence의 단계입니다.

steps
list
필수

StepSequence에 대한 단계입니다.

설명

PipelineData를 사용하여 데이터 종속성을 지정할 필요 없이 StepSequence를 사용하여 특정 시퀀스로 단계를 쉽게 실행할 수 있습니다.

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)

이 예에서 train_step은 prepare_step이 성공적으로 실행을 완료한 후에만 실행됩니다.

세 단계를 병렬로 실행한 다음 네 번째 단계로 전달하려면 다음을 수행합니다.


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