Which code segment should you insert to replace the code comment?

Posted by: Pdfprep Category: DP-100 Tags: , ,

You register a file dataset named csvjolder that references a folder. The folder includes multiple com ma-separated values (CSV) files in an Azure storage blob container. You plan to use the following code to run a script that loads data from the file dataset.

You create and instantiate the following variables:

You have the following code:

You need to pass the dataset to ensure that the script can read the files it references.

Which code segment should you insert to replace the code comment?
A . inputs=[file_dataset.as_named_input(‘training_files’).to_pandas_dataframe()],
B . inputs=[file_dataset.as_named_input(‘training_files’).as_mount()],
C . script_params={‘–training_files’: file_dataset},
D . inputs=[file_dataset.as_named_input(‘training_files’)],

Answer: D

Explanation:

from azureml.train.estimator import Estimator

script_params = {

# to mount files referenced by mnist dataset

‘–data-folder’: mnist_file_dataset.as_named_input(‘mnist_opendataset’).as_mount(),

‘–regularization’: 0.5

}

est = Estimator(source_directory=script_folder,

script_params=script_params,

compute_target=compute_target,

environment_definition=env,

entry_script=’train.py’)

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/tutorial-train-models-with-aml

Leave a Reply

Your email address will not be published.