Azure ML: Deploying a Scoring Explainer with Model Deployment

Add a Scoring Explainer for Real-time Explanations in Azure ML

Question

Azure ML enables you to interpret your model's results during training by adding a tabular explainer to your experiment script.

Your model is now trained, you want to deploy it, and you also want to know how it behaves under real circumstances and you want to generate explanations also during inferencing, together with predictions.

You want to embed a scoring explainer in your code.

Which steps do you need to execute, in what sequence? Create a scoring explainer Add the scoring explainer to your model's entry script Create a tabular explainer Deploy your model and the tabular explainer together Register scoring explainer as a model Deploy your model and the scoring explainer together.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: B.

Option A is incorrect because in order to create a scoring explainer, you need to create a “standard” explainer object (in this case: tabular) first.

Option B is CORRECT because in order to generate feature data at inference time, you need to create an explainer (e.g.

tabular), wrap it into a scoring explainer, register it as a model, add it to your model's entry script (so that it can be invoked), and deploy it together with your model.

Then it's ready for use.

Option C is incorrect because the scoring explainer is actually a wrapper around an explainer (e.g.

tabular)

What you need to deploy is the scoring explainer, as a scoring model.

Deploying the tabular explainer is unnecessary.

Option D is incorrect because the scoring explainer is actually a wrapper around an explainer (e.g.

tabular)

What you need to deploy is the scoring explainer, as a scoring model.

Deploying the tabular explainer is unnecessary.

Reference:

The correct sequence of steps to execute for embedding a scoring explainer in your code and deploying it with a tabular explainer along with the model is:

  1. Create a scoring explainer: The first step is to create a scoring explainer for your model. The scoring explainer is used to generate explanations during inferencing. It is responsible for computing feature importance scores that are used to explain the predictions made by the model.

  2. Add the scoring explainer to your model's entry script: Once the scoring explainer is created, it needs to be added to the entry script of your model. This will ensure that the scoring explainer is run during the inferencing process.

  3. Create a tabular explainer: The next step is to create a tabular explainer. The tabular explainer is used to interpret the model's results during training. It helps you understand the importance of the features used in the model.

  4. Deploy your model and the tabular explainer together: After creating the tabular explainer, the model and the tabular explainer need to be deployed together. This ensures that the model can be interpreted during training.

  5. Register scoring explainer as a model: The scoring explainer needs to be registered as a separate model. This is required to make it easy to manage and deploy the scoring explainer independently of the model.

  6. Deploy your model and the scoring explainer together: Finally, the model and the scoring explainer need to be deployed together. This ensures that the explanations are generated during inferencing and the results are interpreted during training.

Therefore, the correct sequence of steps is option C, i.e., 3, 1, 4, 5, 2.