2 Answers
- Newest
- Most votes
- Most comments
0
There is a blog that shows how you can invoke a Sagemaker endpoint from a lambda function - https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda/
0
Yes I have gone through the approach as mentioned by you above but the problem is I am not a Machine Learning Expert so it will take me sometime to write inference for Text-to-Image
. If you have python code for that it would be great as I need to complete that on urgent basis.
answered 2 years ago
Relevant content
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
{ "errorMessage": "An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from primary with message "{\n "code": 400,\n "type": "InternalServerException",\n "message": "\"Unknown task Text-to-image, available tasks are [\u0027feature-extraction\u0027, \u0027text-classification\u0027, \u0027token-classification\u0027, \u0027question-answering\u0027, \u0027table-question-answering\u0027, \u0027fill-mask\u0027, \u0027summarization\u0027, \u0027translation\u0027, \u0027text2text-generation\u0027, \u0027text-generation\u0027, \u0027zero-shot-classification\u0027, \u0027conversational\u0027, \u0027image-classification\u0027, \u0027translation_XX_to_YY\u0027]\""\n}\n". See https://ca-central-1.console.aws.amazon.com/cloudwatch/home?region=ca-central-1#logEventViewer:group=/aws/sagemaker/Endpoints/huggingface-pytorch-inference-2022-07-15-18-51-02-821 in account 428136181372 for more information.", "errorType": "ModelError", "stackTrace": [ [ "/var/task/lambda_function.py", 16, "lambda_handler", "Body=serialized_input" ], [ "/var/runtime/botocore/client.py", 391, "_api_call", "return self._make_api_call(operation_name, kwargs)" ], [ "/var/runtime/botocore/client.py", 719, "_make_api_call", "raise error_class(parsed_response, operation_name)" ] ] } This is the error I am experiencing.
Have you tried the approach suggested here - https://discuss.huggingface.co/t/can-text-to-image-models-be-deployed-to-a-sagemaker-endpoint/20120