Predict probability on AWS SageMaker AutoPilot endpoint

Viewed 800

I am testing SageMaker AutoPilot in order to verify how good it is for regular use.

Up until now, it seems relatively easy to use it, it trained a model with good results and it was easy to create the endpoint. I would like to get the predicted label and its probability, in order to check if the prediciton is good. However, I could only get the label and I did not find anything about retrieving the probability (predict_proba).

Is there any way to get the probability? Thank you!

2 Answers

When creating your endpoint model, the environment variables: SAGEMAKER_INFERENCE_OUTPUT and SAGEMAKER_INFERENCE_INPUT must be set in each container in the container list. Valid values are: 'predicted_label, probabilit(y)(ies),labels'

See the following to understand the container configuration: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.create_model

And the link Julien posted has some good, but incomplete information as well: https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-container-output.html

Related