
Answer-first summary for fast verification
Answer: allow_reuse
The `allow_reuse` parameter in PythonScriptStep controls whether the step should reuse previous results when re-run with the same settings. When set to True (which is the default), it enables caching and reuse of outputs when the step contents (including source_directory), inputs, and parameters remain unchanged. This directly addresses the requirement to cache and reuse outputs when source_directory hasn't changed. The other options are less suitable: 'version' is for dataset versioning, 'data.as_input(name=...)' is for specifying dataset inputs, and 'hash_paths' is not a standard parameter for PythonScriptStep that controls caching behavior.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You use the Azure Machine Learning SDK for Python to create a pipeline that includes a PythonScriptStep.
The output of the step run must be cached and reused on subsequent runs when the source_directory value has not changed.
You need to define the step.
What should you include in the step definition?

A
allow_reuse
B
version
C
data.as_input(name=…)
D
hash_paths