DP-100 · Question #243
You use the following code to define the steps for a pipeline: from azureml.core import Workspace, Experiment, Run from azureml.pipeline.core import Pipeline from azureml.pipeline.steps import…
The correct answer is C. pipeline = Pipeline(workspace=ws, steps=pipeline_steps) D. pipeline = Pipeline(workspace=ws, steps=pipeline_steps). Both C and D show the same first line: pipeline = Pipeline(workspace=ws, steps=pipeline_steps). This creates a Pipeline object from the defined steps. The two valid approaches to then submit and run it are: (C) using experiment.submit(pipeline) - where an Experiment object is…
Question
Options
- Aexperiment = Experiment(workspace=ws,
- Brun = Run(pipeline_steps)
- Cpipeline = Pipeline(workspace=ws, steps=pipeline_steps)
- Dpipeline = Pipeline(workspace=ws, steps=pipeline_steps)
How the community answered
(58 responses)- A7% (4)
- B3% (2)
- C90% (52)
Explanation
Both C and D show the same first line: pipeline = Pipeline(workspace=ws, steps=pipeline_steps). This creates a Pipeline object from the defined steps. The two valid approaches to then submit and run it are: (C) using experiment.submit(pipeline) - where an Experiment object is created and the pipeline is submitted to it, returning a PipelineRun; and (D) using pipeline.submit(experiment_name='...') - directly calling submit on the Pipeline object with an experiment name. Option B (run = Run(pipeline_steps)) is invalid because the Run class constructor does not accept pipeline steps. Option A is incomplete as shown. Both C and D represent correct end-to-end patterns for executing an Azure ML pipeline.
Topics
Community Discussion
No community discussion yet for this question.