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.
Question
Options
- APythonScriptStep
- BAutoMLStep
- CCommandStep
- DStepRun
How the community answered
(46 responses)- A89% (41)
- B4% (2)
- D7% (3)
Why each option
PythonScriptStep and CommandStep are both valid Azure ML SDK classes that can run a Python script as a pipeline step.
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.
AutoMLStep integrates an automated machine learning run into a pipeline and does not execute a custom Python script.
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.
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
Community Discussion
No community discussion yet for this question.