New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft DP-100 Exam - Topic 1 Question 133 Discussion

Actual exam question for Microsoft's DP-100 exam
Question #: 133
Topic #: 1
[All DP-100 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?

Show Suggested Answer Hide Answer
Suggested Answer: A

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.


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

Contribute your Thoughts:

0/2000 characters
Sage
13 days ago
I’m surprised they didn’t mention the size of the dataset!
upvoted 0 times
...
Tonette
19 days ago
Wait, why not A? That seems logical.
upvoted 0 times
...
Lawrence
24 days ago
I think D could work too, but not for streaming.
upvoted 0 times
...
Makeda
29 days ago
Haha, I bet the correct answer is "All of the above" and they're just trying to trick us!
upvoted 0 times
...
Cecilia
1 month ago
Hmm, I'm torn between B) and D). Streaming or downloading? Decisions, decisions...
upvoted 0 times
...
Ming
1 month ago
I'm going with C) because it just looks the most straightforward.
upvoted 0 times
...
Glenna
1 month ago
I recall that using as_mount allows for streaming data directly, so I’m leaning towards option B, but I need to double-check the details.
upvoted 0 times
...
Jenifer
2 months ago
I’m a bit confused about the argument names. I thought it was supposed to be '--input-data', but I see an option with '--data-data' which seems off.
upvoted 0 times
...
Goldie
2 months ago
I think we practiced a similar question where we had to choose between mounting and downloading datasets. I feel like mounting is the right choice here.
upvoted 0 times
...
Thersa
2 months ago
I remember we discussed how to use datasets in Azure ML, but I'm not sure if I should use as_mount or as_download for streaming large files.
upvoted 0 times
...
Frederica
2 months ago
I'm feeling pretty good about this one. The key is that the dataset needs to be streamed directly from its source, so I'm going to go with B) arguments = ['--input-data', ds.as_mount()]. That seems like the best option to meet the requirements of the question.
upvoted 0 times
...
Albina
2 months ago
Okay, let me think this through. The question says we need to define a ScriptRunConfig object and pass the dataset as an argument. Based on that, I think B) using the as_mount() method is the way to go. That will allow the script to access the data directly from its source, which is what the question is asking for.
upvoted 0 times
...
Marva
3 months ago
B) looks good to me. Streaming the data directly from the source is the way to go.
upvoted 0 times
...
Tesha
3 months ago
B is the right choice! Streaming is key.
upvoted 0 times
...
Renea
3 months ago
I think option B is the best choice.
upvoted 0 times
...
Maryrose
3 months ago
D) seems like the best option. Downloading the dataset is probably the most reliable way to pass it as an argument.
upvoted 0 times
...
Chi
4 months ago
Hmm, this is a tricky one. I'm not sure which option is the best. I know we need to pass the dataset as an argument, but the wording about streaming directly from the source is throwing me off. Maybe B) or D) could work, but I'm not totally confident.
upvoted 0 times
...
Cristal
4 months ago
I think I understand the question. We need to pass the dataset as an argument to the script, and the key is how we want to access the data. I'm leaning towards B) since it says the dataset should be streamed directly from its source, so using the mount option seems like the best approach.
upvoted 0 times
Rasheeda
3 months ago
B) makes sense for streaming data.
upvoted 0 times
...
...

Save Cancel