nerdexam
Microsoft

DP-100 · Question #342

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might…

The correct answer is B. No. The proposed solution does not correctly pass the training_data path argument to the command job script in Azure ML SDK v2.

Train and deploy models

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You manage an Azure Machine Learning workspace. The Python script named script.py reads an argument named training_data. The training_data argument specifies the path to the training data in a file named dataset1.csv. You plan to run the script.py Python script as a command job that trains a machine learning model. You need to provide the command to pass the path for the dataset as a parameter value when you submit the script as a training job. Solution: python script.py --training_data dataset1.csv Does the solution meet the goal?

Options

  • AYes
  • BNo

How the community answered

(32 responses)
  • A
    16% (5)
  • B
    84% (27)

Why each option

The proposed solution does not correctly pass the training_data path argument to the command job script in Azure ML SDK v2.

AYes

The solution does not properly configure the command job to pass the training_data path, so it cannot be considered a valid approach to meeting the stated requirement.

BNoCorrect

To correctly pass a file path to a script in an Azure ML command job, the job definition must declare an Input() referencing the data asset and the command string must embed ${{inputs.training_data}} so the path to dataset1.csv is resolved and injected at runtime. Any solution that deviates from this pattern will fail to deliver the correct path to the script argument.

Concept tested: Azure ML SDK v2 command job data input passing

Source: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-train-model

Topics

#Azure Machine Learning#Command Jobs#Data Inputs#Training Jobs

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice