exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 3 question 43 discussion

Actual exam question from Microsoft's DP-100
Question #: 43
Topic #: 3
[All DP-100 Questions]

You use the Azure Machine Learning service to create a tabular dataset named training_data. You plan to use this dataset in a training script.
You create a variable that references the dataset using the following code: training_ds = workspace.datasets.get("training_data")
You define an estimator to run the script.
You need to set the correct property of the estimator to ensure that your script can access the training_data dataset.
Which property should you set?

  • A. environment_definition = {"training_data":training_ds}
  • B. inputs = [training_ds.as_named_input('training_ds')]
  • C. script_params = {"--training_ds":training_ds}
  • D. source_directory = training_ds
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Example:
# Get the training dataset
diabetes_ds = ws.datasets.get("Diabetes Dataset")
# Create an estimator that uses the remote compute
hyper_estimator = SKLearn(source_directory=experiment_folder, inputs=[diabetes_ds.as_named_input('diabetes')], # Pass the dataset as an input compute_target = cpu_cluster, conda_packages=['pandas','ipykernel','matplotlib'], pip_packages=['azureml-sdk','argparse','pyarrow'], entry_script='diabetes_training.py')
Reference:
https://notebooks.azure.com/GraemeMalcolm/projects/azureml-primers/html/04%20-%20Optimizing%20Model%20Training.ipynb

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ljljljlj
Highly Voted 2 years, 4 months ago
On exam 2021/7/10
upvoted 8 times
...
DanielGP
Highly Voted 2 years, 10 months ago
Train a model from a tabular dataset: Now that you have datasets, you're ready to start training models from them. You can pass datasets to scripts as INPUTS in the estimator being used to run the script.
upvoted 7 times
treadst0ne
2 years, 9 months ago
I concur.
upvoted 2 times
...
...
Peeking
Most Recent 9 months ago
Selected Answer: B
B would seem the closest answer but it was not properly described in the answers: from azureml.core import ScriptRunConfig src = ScriptRunConfig(source_directory=script_folder, script='train_titanic.py', # pass dataset as an input with friendly name 'titanic' arguments=['--input-data', titanic_ds.as_named_input('titanic')], compute_target=compute_target, environment=myenv) # Submit the run configuration for your training run run = experiment.submit(src) run.wait_for_completion(show_output=True) Reference: https://learn.microsoft.com/en-us/azure/machine-learning/v1/how-to-train-with-datasets
upvoted 1 times
...
ning
1 year, 6 months ago
I guess if you want to pass the parameter into estimator it will be C; now the question is asking inside the estimator you are reading the input, it is B ... Still a bit confusion ...
upvoted 2 times
...
JJason
2 years ago
why should not inputs = [training_ds.as_named_input('training_ds').as_mount()]?
upvoted 3 times
...
chaudha4
2 years, 7 months ago
Estimator is deprecated. Can anyone confirm if they saw a question on this topic lately ?
upvoted 5 times
...
shivaborusu
3 years ago
Answer must be C
upvoted 1 times
shivaborusu
3 years ago
Taking back.. B is correct answer
upvoted 8 times
...
...
epgd
3 years, 5 months ago
why the correct answer is not script_params ?
upvoted 1 times
amelia
3 years, 5 months ago
The question does not specify using command-line arguments to pass to the training script, so I guess it is assumed the traiining data is specified as an input compute target in the estimator properties.
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...