Closed papagala closed 3 years ago
I think I found the solution. But I still think it's a bug. The files seem to be too large. I'm using smaller sized pics and is working fine.
The error message you get back, says nothing about it which is confusing.
I compressed all images and the problem went away
Ok, I discovered something else. Looks like if you rerun the notebook, the images double, triple in size (they become n times large with n the number of times you run the notebook).
This fixes that problem:
for ind in test_photos_index:
!rm sample-a2i-images/pexels-photo-{ind}.jpeg
Maybe with bash magic we can check if the file already exists to NOT redownload it, but this is fine for me
Hello @papagala, thanks for your feedback. Indeed the SageMaker error
ConnectionClosedError: Connection was closed before we received a valid response from endpoint URL: "https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints/DEMO-object-detection-augmented-ai-2020-05-19-00-18-57/invocations".
could stem from image payload to the endpoint exceeding the limit 5MB. The original files are around 2-3 MB. Thanks for reporting that the curl would append the image and grow the file size. It's something we can address easily.
We will also address the description for running environment. Thanks for your feedback again.
Thanks a lot!
Closing based on michaelhsieh42@'s merge
Thank you all!
It's a bit unclear how to run this locally, but managed to bypass errors around credentials not being found by passing a boto3.Session to the sagemaker.Session that calls one of my "profile_name"s.
However, I'm getting this error everytime I try to make a prediction. Specifically when I run
I get
If I run
results = object_detector.predict("dummy text")
I get something I can understand and expect:
Name: boto3 Version: 1.13.12
Name: sagemaker Version: 1.58.2
Name: botocore Version: 1.16.12
Python 3.7.3