我在aws sagemaker上部署了一个大型3D模型。推理需要2分钟或更长时间。从Python调用predictor时,我得到了以下错误:
An error occurred (ModelError) when calling the InvokeEndpoint operation: Received server error (0) from model with message "Your invocation timed out while waiting for a response from container model. Review the latency metrics for each container in Amazon CloudWatch, resolve the issue, and try again."'在Cloud Watch中,当容器正在处理时,我还看到一些PING超时:
2020-10-07T16:02:39.718+02:00 2020/10/07 14:02:39 https://forums.aws.amazon.com/ 106#106: *251 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.32.0.2, server: , request: "GET /ping HTTP/1.1", upstream: "http://unix:/tmp/gunicorn.sock/ping", host: "model.aws.local:8080"如何增加调用超时?
或者有没有办法对sagemaker端点进行异步调用?
发布于 2020-10-10 20:08:27
目前还不能增加超时--这在GitHub中是一个开放的问题。纵观这个问题和SO上的类似问题,似乎你可以将批处理转换与推理结合使用。
参考文献
https://stackoverflow.com/a/55642675/806876
Sagemaker Python SDK超时问题:https://github.com/aws/sagemaker-python-sdk/issues/1119
发布于 2020-12-03 21:43:31
此超时实际上是在服务器端点处指定的。您可以尝试bring your own container的方式,也称为BYOC,通过这种方式,您可以完全控制端点端的一切,包括超时。
您还可以引用这个存储库的端点部分,它来自我的一个同事- https://github.com/jackie930/yolov4-SageMaker
serve.py model_server_timeout = os.environ.get('MODEL_SERVER_TIMEOUT', 60)中已存在应更改的超时
https://stackoverflow.com/questions/64246437
复制相似问题