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.
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 train.py --training_data training_data
Does the solution meet the goal?
- A. Yes
- B. No Correct
Explanation
In a command job, an input is passed to the script with the ${{inputs.<input_name>}} expression, for example python script.py --training_data ${{inputs.training_data}}, which Azure Machine Learning replaces at run time with the mounted or downloaded path of the data. This solution passes the literal string training_data, so the script receives a word rather than the path to dataset1.csv. It also runs train.py instead of script.py.