DP-100 · Question #276
DP-100 Question #276: Real Exam Question with Answer & Explanation
The correct answer is B: details.properties['azureml.git.branch']. {"question_number": 3, "correct_answer": "B and D", "explanation": "To retrieve Git metadata from a training run, you must first call run.get_details() (option D), which returns a dictionary-like object containing run properties including Git metadata automatically captured by Az
Question
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.
Options
- Adetails = run.get_environment()
- Bdetails.properties['azureml.git.branch']
- Cdetails.properties['azureml.git.commit']
- Ddetails = run.get_details()1
Explanation
{"question_number": 3, "correct_answer": "B and D", "explanation": "To retrieve Git metadata from a training run, you must first call run.get_details() (option D), which returns a dictionary-like object containing run properties including Git metadata automatically captured by Azure ML. Then you access details.properties['azureml.git.branch'] (option B) to get the active branch name. Option A is wrong because get_environment() returns the runtime environment definition, not run details. Option C retrieves the commit hash, not the branch name.", "generated_by": "claude-sonnet", "llm_judge_score": 3}
Topics
Community Discussion
No community discussion yet for this question.