DP-100 practice question 32 of 35

You use the Azure Machine Learning Python SDK to create a batch inference pipeline. You must publish the batch inference pipeline so that business groups in your organization can use the pipeline. Each business group must be able to specify a different location for the data that the pipeline submits to the model for scoring. You need to publish the pipeline. What should you do?

Full set: 506 questions

Domain Deploy and operationalize machine learning solutions

Answer options
A: Create multiple endpoints for the published pipeline service and have each business group submit jobs to its own endpoint.
B: Define a PipelineParameter object for the pipeline and use it to specify the business group-specific input dataset for each pipeline run. Correct answer
C: Define a OutputFileDatasetConfig object for the pipeline and use the object to specify the business group-specific input dataset for each pipeline run.
D: Have each business group run the pipeline on local compute and use a local file for the input data.
Correct Answer:
B. Define a PipelineParameter object for the pipeline and use it to specify the business group-specific input dataset for each pipeline run.
Explanation

The PipelineParameter class is the designated mechanism in the Azure Machine Learning SDK for creating dynamic and reusable pipelines. By defining a PipelineParameter for the input dataset, you create a placeholder in the pipeline's definition. When the pipeline is published, this parameter can be set at runtime when a new job is submitted via the REST endpoint. This allows each business group to use the same published pipeline endpoint but specify their own unique input dataset for each batch inference run, directly fulfilling the requirement.

Why Incorrect

A. A single published pipeline has one REST endpoint. Creating multiple endpoints would require publishing multiple, separate pipelines, which is inefficient and not the intended design for this scenario.
C. OutputFileDatasetConfig is used to define an output location for a pipeline step to write data to, not to specify a pipeline's primary input dataset.
D. Running the pipeline on local compute defeats the purpose of publishing a centralized, scalable, and managed pipeline in the Azure Machine Learning service for organizational use.

References

1. Microsoft Official Documentation

azureml.pipeline.core.PipelineParameter class: "Pipeline parameters are parameters of pipelines that can be set at run submission time. The PipelineParameter can be used to make pipeline runs more dynamic." This source directly supports using PipelineParameter for dynamic inputs at runtime.

Source: Microsoft

azureml-pipeline-core

PipelineParameter Class Reference.

2. Microsoft Official Documentation

"Create and run machine learning pipelines": "You can use PipelineParameter objects for any argument where you would normally use a literal... When you trigger a pipeline run with parameters

you'll pass the pipeline parameters with the parameters argument... pipelinerun = experiment.submit(pipeline

parameters={"pipelinearg": "VALUE"})". This demonstrates the exact mechanism for using the parameter at submission time.

Source: Microsoft

Azure Machine Learning Documentation

"Create and run machine learning pipelines with Azure Machine Learning SDK"

Section: "Use PipelineParameter".

3. Microsoft Official Documentation

"Publish and track machine learning pipelines": "When you publish a pipeline

you can specify a default value for a PipelineParameter. If you specify a default value

you don't have to set a value for the parameter when you trigger a run from the REST endpoint." This confirms that PipelineParameter is the correct object to use when publishing pipelines that require variable inputs via the REST endpoint.

Source: Microsoft

Azure Machine Learning Documentation

"Publish and track machine learning pipelines"

Section: "Create a published pipeline".

Scroll to Top