DP-100 · Question #245
You plan to run a Python script as an Azure Machine Learning experiment. The script contains the following code: You must specify a file dataset as an input to the script. The dataset consists of…
The correct answer is A. arguments = ['--input-data', ds.to_pandas_dataframe()]. Note: The listed answer A (to_pandas_dataframe()) is incorrect for this scenario. For a FileDataset of large image files that must be streamed directly from the source without copying to local disk, as_mount() is the correct mode. It exposes the datastore as a virtual…
Question
Exhibit
Options
- Aarguments = ['--input-data', ds.to_pandas_dataframe()]
- Barguments = ['--input-data', ds.as_mount()]
- Carguments = ['--data-data', ds]
- Darguments = ['--input-data', ds.as_download()]
How the community answered
(50 responses)- A78% (39)
- B14% (7)
- C6% (3)
- D2% (1)
Explanation
Note: The listed answer A (to_pandas_dataframe()) is incorrect for this scenario. For a FileDataset of large image files that must be streamed directly from the source without copying to local disk, as_mount() is the correct mode. It exposes the datastore as a virtual filesystem so files are read on-demand, avoiding the overhead of downloading all images before the script starts. as_download() would copy all files to the compute node first-the opposite of streaming from source. to_pandas_dataframe() is only valid for TabularDatasets and cannot represent image files. The requirement to 'stream directly from its source' is the defining clue that points to as_mount().
Topics
Community Discussion
No community discussion yet for this question.
