There is no-response with SageMaker Endpoint access from Ubuntu Python3

0

Hello. Even if I access the Endpoint created with SageMaker from the Python3 (3.10.11) code of Ubuntu (22.04.2) as follows, no response is returned. If I run the same code from Python3(3.9.13) on Mac, the result will be returned without any problem. Its security key settings are also the same, so its AWS services, other than SageMaker, work equally well in both environments. I don't know the reason why there is no reaction only in the case of Ubuntu. There is no error returned. If anyone has any idea, please advise me.

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' )

Thanks and Regards,

  • Please can you describe the behavior a bit more. Are you receiving a specific error? What do you mean by there is no response (is an empty string returned)? Can you depict the output?

asked 10 months ago41 views
No Answers

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.

Guidelines for Answering Questions