nerdexam
Microsoft

DP-100 · Question #495

You build a data pipeline in an Azure Machine Learning workspace by using the Azure Machine Learning SDK for Python. You need to run a Python script as a pipeline step. Which two classes could you use

The correct answer is A. PythonScriptStep C. CommandStep. PythonScriptStep and CommandStep are both valid Azure ML SDK classes that can run a Python script as a pipeline step.

Train and deploy models

Question

You build a data pipeline in an Azure Machine Learning workspace by using the Azure Machine Learning SDK for Python. You need to run a Python script as a pipeline step. Which two classes could you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

Options

  • APythonScriptStep
  • BAutoMLStep
  • CCommandStep
  • DStepRun

How the community answered

(46 responses)
  • A
    89% (41)
  • B
    4% (2)
  • D
    7% (3)

Why each option

PythonScriptStep and CommandStep are both valid Azure ML SDK classes that can run a Python script as a pipeline step.

APythonScriptStepCorrect

PythonScriptStep is a dedicated class in the Azure ML SDK for defining a pipeline step that runs a specified Python script file on a compute target, making it a direct fit for this requirement.

BAutoMLStep

AutoMLStep integrates an automated machine learning run into a pipeline and does not execute a custom Python script.

CCommandStepCorrect

CommandStep is a general-purpose pipeline step class that executes any command-line instruction, including running a Python script via 'python script.py', and is a valid alternative to PythonScriptStep.

DStepRun

StepRun is an object that represents the execution run of a completed or active pipeline step and is not a class used to define or configure a new pipeline step.

Concept tested: Azure ML SDK pipeline step classes for Python script execution

Source: https://learn.microsoft.com/en-us/python/api/azureml-pipeline-steps/azureml.pipeline.steps

Topics

#Azure Machine Learning pipelines#Python SDK#PythonScriptStep#CommandStep

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice