Azure ML Command Job Parameter Passing

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?

  1. Yes Source Reference Answer
  2. No

Community Votes

A
60%
B
40%

60% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The question tests whether a static file path string is acceptable as a parameter value in an Azure ML command job definition versus using input bindings.

This question tests the correct syntax for passing arguments to Python scripts in Azure Machine Learning command jobs. The community consensus is divided, but the official answer confirms that direct string literals are valid for local testing or simple scenarios.

Candidates often choose 'No' because they confuse command jobs with data assets/inputs, expecting the use of `${{inputs.*}}` syntax which is required for referencing registered datasets, not static file paths.

Community Discussion (4 comments)

avinyc 👍 1 Selected: B
No. Correct method in Azure ML is: python script.py --training_data ${{inputs.training_data}}
colin1919 👍 1 Selected: B
No, the path is not specified
D0ktor 👍 1 Selected: A
Absolutely yes
jefimija 👍 2 Selected: A
this should be yes

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The solution meets the goal because Azure ML command jobs allow you to pass literal strings as arguments to your script's entry point. When you define the command in the Command object, you can specify arguments like --training_data dataset1.csv. This tells the runtime to execute python script.py --training_data dataset1.csv. It is a valid way to provide configuration values that do not change per run.

Why the Other Options Are Wrong

Choosing 'No' typically stems from overcomplicating the scenario. While best practices for production pipelines involve using Data objects and ${{inputs.training_data}} to reference registered datasets, the question does not state that dataset1.csv is a registered asset. It simply asks if the command can be provided this way. Since the syntax is technically correct for passing a static argument, 'Yes' is the accurate technical response.

Community Comment Notes

Comments show significant confusion between static arguments and dynamic input bindings. Comment [1] argues for 'No', suggesting the use of ${{inputs.training_data}}, which is correct for registered datasets but unnecessary for a simple file path argument in a basic command job context. Comments [2] and [4] correctly identify that the solution is valid, highlighting that direct assignment is supported.

Official Reference

Exam Strategy

Distinguish between passing static configuration values (strings) and dynamic data references (inputs). If the question involves a specific file path or constant value, a direct string argument is usually sufficient unless the problem explicitly mentions 'registered datasets' or 'data assets'.

Related Analysis

← Back to DP-100 Study Guide