You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2024. It is now read-only.
What did you find confusing? Please describe.
I tried to submit an invoke endpoint request to a serverless endpoint deployed with sagemaker that uses one of these containers. however I can only find docs describing how to submit a request using a predictor variable, like so
Describe how documentation can be improved
An equivalent way to submit a request for inferences using invoke endpoint, specifically for images.
Additional context
I have a way to do this for an old endpoint but it doesn't seem to work for newly deployed sagemaker endpoints (even though the same model.tar.gz is used for both)
This works but only for old endpoints and there are multiple issues on SO and github describing difficulty with this not working anymore but being described in sagemaker docs, example:
# invoke endpoint
response = client.invoke_endpoint(
EndpointName = "mira-large",
ContentType = 'application/x-image',
Body = buf.getvalue()
)
# parse response
response_body = response['Body'].read()
response_body = response_body.decode('utf-8')
pred = json.loads(response_body)["predictions"][0]
output = {}
for i in range(len(pred)): output[CLASSES[i]] = float(pred[i])
print(output)
The text was updated successfully, but these errors were encountered:
rbavery
changed the title
Docs on how to submit an invoke endpoint request, comparison to predict
Docs on how to submit an invoke endpoint request for images, comparison to predict method
Jul 6, 2022
ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (415) from model with message "{"error": "Unsupported Media Type: application/x-image"}"
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What did you find confusing? Please describe.
I tried to submit an invoke endpoint request to a serverless endpoint deployed with sagemaker that uses one of these containers. however I can only find docs describing how to submit a request using a predictor variable, like so
as described here https://github.com/aws/sagemaker-tensorflow-serving-container#deploying-a-tensorflow-serving-model
Describe how documentation can be improved
An equivalent way to submit a request for inferences using invoke endpoint, specifically for images.
Additional context
I have a way to do this for an old endpoint but it doesn't seem to work for newly deployed sagemaker endpoints (even though the same model.tar.gz is used for both)
This works but only for old endpoints and there are multiple issues on SO and github describing difficulty with this not working anymore but being described in sagemaker docs, example:
The text was updated successfully, but these errors were encountered: