exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 5 question 28 discussion

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

You develop a machine learning project on a local machine. The project uses the Azure Machine Learning SDK for Python. You use Git as version control for scripts.
You submit a training run that returns a Run object.
You need to retrieve the active Git branch for the training run.
Which two code segments should you use? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. details = run.get_environment()
  • B. details.properties['azureml.git.branch']
  • C. details.properties['azureml.git.commit']
  • D. details = run.get_details()
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

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
giusecozza
Highly Voted 2 years, 3 months ago
should be B & D, it is clearly explained here: https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.run(class)?view=azure-ml-py#azureml-core-run-get-details
upvoted 6 times
JTWang
2 years, 2 months ago
But the return type of get_details() is dict,not Run Object.
upvoted 1 times
JTWang
2 years, 2 months ago
Oh~I got it.You got a Run object! I read it wrong.
upvoted 1 times
JTWang
2 years, 2 months ago
B ref:https://learn.microsoft.com/en-us/azure/machine-learning/concept-train-model-git-integration
upvoted 1 times
...
...
...
...
GHill1982
Most Recent 11 months, 2 weeks ago
Selected Answer: BD
To retrieve the active Git branch for the training run, you need to use the following two code segments: D. details = run.get_details() B. details.properties[‘azureml.git.branch’] The first code segment gets the details of the run object, which includes information about the Git repository and branch that the source files came from. The second code segment accesses the property that stores the name of the active Git branch.
upvoted 1 times
...
Yuriy_Ch
1 year, 9 months ago
Selected Answer: BD
D, then B. giusecozza provided the link explaining.
upvoted 1 times
...
phdykd
1 year, 10 months ago
To retrieve the active Git branch for the training run, you should use the following code segments: Retrieve the Run object: css Copy code run = <insert code to submit a training run that returns a Run object> Retrieve the run details: css Copy code details = run.get_details() Access the Git branch property from the run details: css Copy code branch = details['properties']['azureml.git.branch'] Therefore, the correct code segments are B and D.
upvoted 1 times
...
AzureJobsTillRetire
1 year, 10 months ago
Selected Answer: BD
The sequence of code is D and then B details = run.get_details() and then you can use details.properties['azureml.git.branch']
upvoted 2 times
...
BTAB
1 year, 11 months ago
Selected Answer: BD
B - https://learn.microsoft.com/en-us/azure/machine-learning/concept-train-model-git-integration D - https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.run(class)?view=azure-ml-py#azureml-core-run-get-details
upvoted 1 times
...
Mckay_
2 years, 2 months ago
The question did not mention anything about committing any changes.
upvoted 1 times
...
Mckay_
2 years, 2 months ago
The answers should be B & D.
upvoted 2 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 ...