1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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)
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 7 mois
- demandé il y a 5 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
ありがとうございます。 正確には、client.invoke_endpoint() の行を実行中にフリーズしている様です。 endpoint_response を確認する前の問題と思われます。
以下のブログを参考にboto3のデバッグを確認してみるとよいかもしれません。 https://dev.classmethod.jp/articles/boto3-debug-logging/