
Answer-first summary for fast verification
Answer: inputs = [training_ds.as_named_input('training_ds')]
The correct answer is B because in Azure ML estimators, datasets are passed to training scripts using the `inputs` parameter. The `inputs` property accepts a list of datasets, and `as_named_input()` provides a friendly name for accessing the dataset within the script. This is confirmed by the community discussion where multiple users reference official documentation and examples showing datasets passed as inputs in estimators. Option A (environment_definition) is incorrect as it's not a valid estimator property for datasets. Option C (script_params) is for command-line arguments, not dataset inputs. Option D (source_directory) specifies the script location, not dataset access.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You use Azure Machine Learning to create a tabular dataset named training_data. You plan to use this dataset in a training script.
You create a variable that references the dataset using the following code:
training_ds = workspace.datasets.get("training_data")
training_ds = workspace.datasets.get("training_data")
You define an estimator to run the script.
You need to set the correct property of the estimator to ensure your script can access the training_data dataset.
Which property should you set?
A
environment_definition = {"training_data":training_ds}
B
inputs = [training_ds.as_named_input('training_ds')]
C
script_params = {"--training_ds":training_ds}
D
source_directory = training_ds
No comments yet.