除了/invocations之外,是否还可以访问SageMaker中托管的端点? [英] Is it possible to hit endpoints hosted in SageMaker besides /invocations?

查看:93
本文介绍了除了/invocations之外,是否还可以访问SageMaker中托管的端点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用aws sagemaker cli工具,可以使用以下命令来调用sagemaker中托管的端点:

Using the aws sagemaker cli tools it's possible to invoke endpoint that are hosted in sagemaker using a command like:

aws sagemaker-runtime invoke-endpoint --body file://container/local_test/payload.json \
--endpoint-name $(DEPLOYMENT_NAME)-staging \
--content-type application/json \
--accept application/json \
output.json

默认情况下,此命令转到/invocations端点.有可能去另一个端点吗?例如,如果我实现了health-report端点?绝对可以像

By default, this command goes to the /invocations endpoint. Is it possible to go to a different endpoint? For example, if I implemented a health-report endpoint? It's definately possible to make one as in the BYOM example. I'm just not sure how I'd access it.

谢谢!

推荐答案

/invocations不是SageMaker端点,它是用于处理预测请求的HTTP请求路径.

/invocations is not a SageMaker Endpoint, it's a HTTP request path where the prediction request is handled.

请参阅文档: https://docs.aws.amazon. com/sagemaker/latest/dg/API_runtime_InvokeEndpoint.html

请求语法:
POST/endpoints/EndpointName/调用HTTP/1.1
内容类型:ContentType
接受:接受

Request syntax:
POST /endpoints/EndpointName/invocations HTTP/1.1
Content-Type: ContentType
Accept: Accept

对于您的端点,请求就像:
POST/endpoints/$(DEPLOYMENT_NAME)-登台/调用HTTP/1.1
内容类型:ContentType
接受:接受

To your endpoint, the request is like:
POST /endpoints/$(DEPLOYMENT_NAME)-staging/invocations HTTP/1.1
Content-Type: ContentType
Accept: Accept

这篇关于除了/invocations之外,是否还可以访问SageMaker中托管的端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆