nerdexam
Microsoft

DP-100 · Question #276

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…

The correct answer is B. details.properties['azureml.git.branch'] D. details = run.get_details()1. 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']…

Explore data and run experiments

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

How the community answered

(68 responses)
  • A
    9% (6)
  • B
    76% (52)
  • C
    15% (10)

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.

Topics

#Azure Machine Learning SDK#Run management#Git integration#Experiment tracking

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice