1 Resposta
- Mais recentes
- Mais votos
- Mais comentários
0
"print(endpoint_response)"を確認してレスポンスが何も入っていないという認識で合っていますか?
import boto3
import json
client = boto3.client('sagemaker-runtime')
file_name = 'my_photos.jpg'
endPoint = 'my-endpoint'
with open(file_name, 'rb') as image:
f = image.read()
b = bytearray(f)
endpoint_response = client.invoke_endpoint( EndpointName=endPoint, Body=b, ContentType='image/jpeg' )
print(endpoint_response)
Conteúdo relevante
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há um ano
ありがとうございます。 正確には、client.invoke_endpoint() の行を実行中にフリーズしている様です。 endpoint_response を確認する前の問題と思われます。
以下のブログを参考にboto3のデバッグを確認してみるとよいかもしれません。 https://dev.classmethod.jp/articles/boto3-debug-logging/