Skip to content

Predication Failure Response

0

Hi Community, I have created a catboost endpoint with the help of pytorch container where I called the image_uri for the catboost classification and successfully created the endpoint. The error raises when i tried to predict a single row from the endpoint which resulted in given me this error :

ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received server error (0) from primary with message "Your invocation timed out while waiting for a response from container primary. Review the latency metrics for each container in Amazon CloudWatch, resolve the issue, and try again."

Please provide your views on this.

4 Answers
1

Hello,

Thank you for reaching out the repost community. Hope you are doing well.

  1. Can you please check the CloudWatch logs of the endpoint(/aws/sagemaker/Endpoints/[EndpointName] [production-variant-name]/[instance-id]) for the failed endpoint to understand why the invocations were failing?

  2. Since you are using a PyTorch container, it could be possible that there might be some errors related to CPU, GPU, memory utilisation based whether your model is running on GPU/CPU which may be the cause of the failure and more information can be seen from the resource utilisation metrics from the CloudWatch logs.

  3. Better way identify these issues could be running the docker container in local mode on a notebook instance of same type using Sagemaker local mode where you have more visibility into above metrics/logs.

If you did not find anything in the cloud watch logs and cloud metrics, please raise a ticket to AWS Support Team for further investigation.

If you found my answer helpful in resolving your issue, please accept the answer so that it will help others facing similar issues.

AWS

answered 2 years ago

0

Thank you for this help But we already tried these things and they are not working and giving same error. And cloud watch logs showing Error : load model failed

answered 2 years ago

0

The error Error : load model failed, seems to be coming from the loading function where your model is failing to get loaded. The possible reasons could be

  • The model.tar.gz is corrupted are in a different format that is not supported by the frame works.
  • You can try to load the model file locally using the same model class object and try to see if that works to identify these errors.

Additional resources: https://repost.aws/knowledge-center/sagemaker-endpoint-creation-fail#:~:text=.%20For%20example%2C%20the%20code%20might%20fail%20because%20of%20the%20model_fn%20for%20PyTorch.

AWS

answered 2 years ago

0

We have tried the same thing still getting the same error.We also verfied the tarball and it is supooirting the framework.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.