
Answer-first summary for fast verification
Answer: inputs=[file_dataset.as_named_input('training_files').as_mount()],
The correct answer is B because it uses `as_mount()` to mount the dataset, which is required when the script needs to read files directly from the dataset. Option A only names the input but does not mount it, so the script cannot access the files. Option C converts to a pandas DataFrame, which is not suitable for file-based access to multiple CSV files. Option D uses `script_params` incorrectly; dataset references should be passed via the `inputs` parameter in the Estimator, not as script parameters. The community discussion confirms B is correct, with 100% consensus, and explains that `as_mount()` is necessary for loading data from file datasets.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have registered a file dataset named csv_folder that references a folder containing multiple CSV files in an Azure blob storage container.
You plan to use the following code to run a script that loads data from the file dataset. You have created and instantiated these variables:
datastore = ws.get_default_datastore()
dataset = Dataset.get_by_name(ws, 'csv_folder')
script_params = {
# to do: code segment to be inserted here
}
datastore = ws.get_default_datastore()
dataset = Dataset.get_by_name(ws, 'csv_folder')
script_params = {
# to do: code segment to be inserted here
}
You need to pass the dataset to the script to ensure it can read the files it references.
Which code segment should you insert to replace the comment?

A
inputs=[file_dataset.as_named_input('training_files')],
B
inputs=[file_dataset.as_named_input('training_files').as_mount()],
C
inputs=[file_dataset.as_named_input('training_files').to_pandas_dataframe()],
D
script_params={'--training_files': file_dataset},
No comments yet.