Exam4Training

Which two code segments can you use to achieve this goal?

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 PythonScriptStep

ws = Workspace.from_config()

. . .

step1 = PythonScriptStep(name="step1", …)

step2 = PythonScriptsStep(name="step2", …)

pipeline_steps = [step1, step2]

You need to add code to run the steps.

Which two code segments can you use to achieve this goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
A . experiment = Experiment(workspace=ws,
name=’pipeline-experiment’)
run = experiment.submit(config=pipeline_steps)
B . run = Run(pipeline_steps)
C . pipeline = Pipeline(workspace=ws, steps=pipeline_steps)
experiment = Experiment(workspace=ws,
name=’pipeline-experiment’)
run = experiment.submit(pipeline)

D . pipeline = Pipeline(workspace=ws, steps=pipeline_steps)
run = pipeline.submit(experiment_name=’pipeline-experiment’)

Answer: C,D

Explanation:

After you define your steps, you build the pipeline by using some or all of those steps.

# Build the pipeline. Example:

pipeline1 = Pipeline(workspace=ws, steps=[compare_models])

# Submit the pipeline to be run

pipeline_run1 = Experiment(ws, ‘Compare_Models_Exp’).submit(pipeline1)

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-create-machine-learning-pipelines

Latest DP-100 Dumps Valid Version with 227 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version