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
Describe the bug
In AWS Clarify in ModelConfig for images the accepted content type is image/png while in the AWS jump start the only accepted content type is application/x-image which is not accepted in ModelConfig of Clarify.
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
To reproduce
Train an image classification model using jumpstart
Use that model with AWS clarify (to get shap values for example)
Expected behavior
I expect it to work
Screenshots or logs
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"}"
System information
A description of your system. Please provide:
SageMaker Python SDK version:
Framework name (eg. PyTorch) or algorithm (eg. KMeans): tensorflow
Framework version:
Python version: 3.6
CPU or GPU:
Custom Docker image (Y/N): N
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
In AWS Clarify in
ModelConfig
for images the accepted content type isimage/png
while in the AWS jump start the only accepted content type isapplication/x-image
which is not accepted inModelConfig
of Clarify.from
inference.py
in jumpstart:To reproduce
Expected behavior
I expect it to work
Screenshots or logs
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"}"
System information
A description of your system. Please provide:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: