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
When I run my code I get this error:
An error occurred (ModelError) when calling the InvokeEndpoint operation (reached max retries: 0): Received server error (500) from primary with message "{"error": "unsupported content type image/png"}"
I have been able to use this error for Batch Inference using png files, before, but it does not work with Clarify.
The text was updated successfully, but these errors were encountered:
I found where the problem may be, the following code is the inference.py of sagemaker jumpstart
definput_fn(input_data, content_type):
""" Args: input_data: the request payload serialized in the content_type format content_type: the request content_type """ifcontent_type=="application/x-image":
decoded=Image.open(io.BytesIO(input_data))
else:
raiseValueError(f"Type [{content_type}] not supported.")
preprocess=transforms.Compose([transforms.ToTensor()])
normalized=preprocess(decoded)
returnnormalized
Here the only acceptable content_type is "application/x-image" but it is not allowed in ModelConfig. Any idea how to solve this?
Hi,
I have fine-tuned an image classification model using SageMaker jump start.
I have also deployed my model. This is my code for deploying my model:
I have only one img.png as input.
When I run my code I get this error:
An error occurred (ModelError) when calling the InvokeEndpoint operation (reached max retries: 0): Received server error (500) from primary with message "{"error": "unsupported content type image/png"}"
I have been able to use this error for Batch Inference using png files, before, but it does not work with Clarify.
The text was updated successfully, but these errors were encountered: