Azure DP-100: Registering the Best Model for Inference

Registering the Best Model for Inference

Question

You are training your ML model using autoML experiments, which, after ten iterations has come to a model which is able to predict target values with the required performance.

You are about to deploy it to the inference environment.

As the first step of the process, you need to register your model.

Which is the simplest way to register the best model?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: C.

Option A is incorrect because this Azure CLI command is used with the azureml.core.

Run object, while you are working in Azure autoML which means that the AutoMLRun must be used.

In this case you have to select the best run manually, which is not the simplest solution.

Option B is incorrect because this script is used with the azureml.core.

Run object, while you are working in Azure autoML which means that the AutoMLRun must be used.

In this case you have to select the best run manually.

Option C is CORRECT because in the case of autoML support, the simplest way of registering the best model is to invoke the ‘run' object from the AutoMLRun, without setting the iteration and metric parameters.

The best run will be registered automatically.

Option D is incorrect because in the case of autoML support, the simplest way of registering the best model is to invoke the ‘run' object from the AutoMLRun.

In this case the number of best iteration is 10, therefore setting iteration=5 will not give the best one.

Reference:

To deploy an ML model to an inference environment on Azure, the first step is to register the model. Model registration makes it easier to manage and track model versions and their metadata. The question suggests that the model is the best-performing model after ten iterations of an AutoML experiment, and the simplest way to register this model is asked.

Option A: The az ml model register command is a command-line interface (CLI) command to register a model. It requires the asset-path parameter, which specifies the path to the model file that needs to be registered. The experiment-name and run-id parameters identify the experiment and run associated with the model. The tag parameter allows adding metadata to the model. This option is not the simplest way to register a model since it involves using the Azure CLI, which may not be ideal for someone not familiar with command-line interfaces.

Option B: This option is using the Azure Machine Learning SDK to register the model. The run object is expected to be an instance of the Run class, which represents the AutoML experiment run. The register_model() method registers the model, and it requires the model_name and model_path parameters. The tags parameter is optional and allows adding metadata to the model. This option is a simple and recommended way to register a model.

Option C: This option is similar to Option B, but it uses a different syntax to register the model. It requires importing the AutoMLRun class, which represents the AutoML experiment run. The register_model() method is called on the run object, and it requires the description parameter. The tags parameter is optional and allows adding metadata to the model. This option is also a simple and recommended way to register a model.

Option D: This option is similar to Option C, but it includes an additional iteration parameter. The iteration parameter is not a valid parameter for the register_model() method and is likely to result in an error. This option is not a valid way to register a model.

Therefore, the simplest and recommended way to register the best-performing model after ten iterations of an AutoML experiment is to use either Option B or Option C. These options use the Azure Machine Learning SDK, which provides an easy and efficient way to manage models on Azure.