exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 3 question 67 discussion

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

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 have a Python script named train.py in a local folder named scripts. The script trains a regression model by using scikit-learn. The script includes code to load a training data file which is also located in the scripts folder.
You must run the script as an Azure ML experiment on a compute cluster named aml-compute.
You need to configure the run to ensure that the environment includes the required packages for model training. You have instantiated a variable named aml- compute that references the target compute cluster.
Solution: Run the following code:

Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
Peeking
8 months, 1 week ago
Selected Answer: B
The Environment class was not imported and there was no .from_conda_specification or python dependencies. The answer is 'No'
upvoted 3 times
...
phdykd
8 months, 2 weeks ago
No. from azureml.core import Environment from azureml.train.sklearn import SKLearn # Create a Python environment for the experiment env = Environment.from_conda_specification(name='sklearn-env', file_path='./scripts/myenv.yml') # Specify the required packages env.python.conda_dependencies.add_pip_package("scikit-learn") # Create an estimator for the experiment estimator = SKLearn(source_directory='./scripts', compute_target=aml_compute, entry_script='train.py', environment_definition=env)
upvoted 1 times
...
michaelmorar
10 months, 3 weeks ago
Selected Answer: B
Nowhere in the code does this solution include the required packages for model training
upvoted 2 times
...
jkuz
2 years ago
Deprecated. https://docs.microsoft.com/en-us/python/api/azureml-train-core/azureml.train.estimator.estimator?view=azure-ml-py If ignore deprecated, it seems to work (see the link).
upvoted 4 times
Arend78
10 months, 2 weeks ago
src = ScriptRunConfig(source_directory=project_folder, script='train.py', compute_target=my_compute_target, environment=myenv) Indeed the environment seems to be missing: https://learn.microsoft.com/en-us/azure/machine-learning/v1/how-to-set-up-training-targets?view=azure-ml-py
upvoted 2 times
...
...
medsimus
2 years, 6 months ago
outdated https://docs.microsoft.com/en-us/python/api/azureml-train-core/azureml.train.sklearn.sklearn?view=azure-ml-py
upvoted 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago