AI-300 practice question 2 of 15
You create an Azure Machine Learning workspace. You must use the Python SDK v2 to implement an experiment from a Jupyter notebook in the workspace. The experiment must log a list of numerical metrics. You need to implement a method to log a list of numerical metrics. Which method should you use?
Full set: 60 questionsFor Azure Machine Learning SDK v2, Microsoft recommends MLflow Tracking for experiment logging. When a requirement specifically calls for logging a list of numerical metric values, the appropriate operation is log_batch(). Microsoft provides an explicit SDK v2 migration example in which a list of numeric values is converted into MLflow Metric objects and submitted through MlflowClient().log_batch(). Technically, the concrete Python implementation uses the tracking client: MlflowClient().log_batch(run_id, metrics=metrics) where metrics contains a sequence of Metric objects representing the numerical values. Microsoft likewise documents batch metric logging as preferable when multiple metrics or multiple values of the same metric need to be recorded efficiently. mlflow.log_metric() records an individual numeric metric value. It can be invoked repeatedly, but Microsoft specifically demonstrates log_batch() for a curve or list of numeric values. mlflow.log_artifact() stores files and other artifacts rather than numerical tracking metrics, while mlflow.log_image() is intended for images and therefore does not satisfy the requirement. Therefore, A is the intended answer. In actual Python SDK v2 code, this operation is normally invoked as MlflowClient().log_batch(). Study Guide Reference: Implement machine learning model lifecycle and operations --- Azure Machine Learning experiments, MLflow tracking, metric logging, experiment observability, and SDK v2 migration.
Keep practicing
Take the free AI-300 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AI-300 practice questions
- Question 1A team deploys a model to a real-time endpoint in Azure Machine Learning. You deploy some…
- Question 3Note: This question is part of a series of questions that present the same scenario. Each…
- Question 4An Azure Machine Learning workspace contains multiple registered versions of a model that…
- Question 5A team is experimenting with traditional models for a classification workflow in Azure Ma…
