
Answer-first summary for fast verification
Answer: pipeline_run.wait_for_completion(show_output=True)
The question requires displaying pipeline run details written to STDOUT when the pipeline completes. Option B (pipeline_run.wait_for_completion(show_output=True)) is correct because it waits for the pipeline to finish execution and displays the output logs, including STDOUT, in real-time. The community discussion shows 100% consensus on B with multiple confirmations that it's the correct approach. Option A (get.metrics()) retrieves metrics but doesn't display STDOUT output. Option C (PipelineParameter) is for defining pipeline parameters, not for displaying output. Option D (get_status()) only returns the current status without waiting for completion or displaying detailed output.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a Python script that executes a pipeline. The script includes the following code:
from azureml.core import Experiment
pipeline_run = Experiment(ws, 'pipeline_test').submit(pipeline)
from azureml.core import Experiment
pipeline_run = Experiment(ws, 'pipeline_test').submit(pipeline)
You need to test the pipeline before deploying the script and display the pipeline run details written to the STDOUT output when the pipeline completes.
Which code segment should you add to the test script?
A
pipeline_run.get.metrics()
B
pipeline_run.wait_for_completion(show_output=True)
C
pipeline_param = PipelineParameter(name="stdout", default_value="console")
D
pipeline_run.get_status()
No comments yet.