Which code segment should you use?

Topic 3, Mix Questions

You plan to run a Python script as an Azure Machine Learning experiment.

The script contains the following code:

import os, argparse, glob

from azureml.core import Run

parser = argparse.ArgumentParser()

parser.add_argument(‘–input-data’,

type=str, dest=’data_folder’)

args = parser.parse_args()

data_path = args.data_folder

file_paths = glob.glob(data_path + "/*.jpg")

You must specify a file dataset as an input to the script. The dataset consists of multiple large image files and must be streamed directly from its source.

You need to write code to define a ScriptRunConfig object for the experiment and pass the ds dataset as an argument.

Which code segment should you use?
A . arguments = [‘–input-data’, ds.to_pandas_dataframe()]
B . arguments = [‘–input-data’, ds.as_mount()]
C . arguments = [‘–data-data’, ds]
D . arguments = [‘–input-data’, ds.as_download()]

Answer: A

Explanation:

If you have structured data not yet registered as a dataset, create a TabularDataset and use it directly in your training script for your local or remote experiment.

To load the TabularDataset to pandas DataFrame df = dataset.to_pandas_dataframe()

Note: TabularDataset represents data in a tabular format created by parsing the provided file or list of files.

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-train-with-datasets

Latest DP-100 Dumps Valid Version with 227 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments