‹ All AI-300 questions

AI-300 Practice Question 3: MLflow Autologging

Microsoft Machine Learning Operations Engineer Associate (AI-300) · Test 1 · question 3 of 10

Implement machine learning model lifecycle and operationseasy

A scikit-learn training script runs as an Azure Machine Learning command job. The team wants the job to capture hyperparameters, evaluation metrics, and the trained model automatically, without adding an explicit logging call for every value the framework produces. Which line should be added before the training code?

Select one answer
Show answer and explanation

Answer:

  • C. mlflow.autolog(), to let the framework flavor record parameters, metrics, and the model

Automatic logging is enabled by inserting mlflow.autolog() before the training code. Each supported framework, scikit-learn among them, then decides what to track, and MLflow records metrics, model parameters, and model artifacts on its own (option C). Azure Machine Learning supports MLflow Tracking natively, so the values land in the job without any further wiring.

- A is wrong because set_experiment only chooses which experiment the run belongs to. It records no parameters, metrics, or models. - B is wrong because start_run only opens a run, and in an Azure Machine Learning job you don't even need it, since runs start automatically. On its own it logs nothing. - D is wrong because log_params records one dictionary of parameters you assembled yourself. It captures no metrics and no model, so it's exactly the per-value manual logging the team wants to avoid.

Reference: Log metrics, parameters, and files with MLflow - Azure Machine Learning

Practice Test 1 ›

Study guides for AI-300