Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error "An error occurred (ModelError) when calling the InvokeEndpoint operation"#4747

Unanswered
sergioCancanEs asked this question inQ&A
Discussion options

Error 500 when consuming SageMaker endpoint deployed with MLflow

Description

Hello everyone,
I successfully replicated the notebook "sm-mlflow_deployment.ipynb" in my JupyterLab Space. However, when I try to consume the endpoint from another notebook or with the SageMaker endpoint test inference tool, I consistently receive a 500 error related to the model.

Steps to Reproduce

  1. Deploy the model using the "sm-mlflow_deployment.ipynb" notebook.
  2. Attempt to consume the endpoint using the following code:
importsagemakerimportboto3importnumpyasnpsagemaker_session=sagemaker.Session()endpoint_name='endpoint_name'# SageMaker Runtime clientclient=boto3.client('sagemaker-runtime')payload=bytes(np.array([1.0,2.0,3.0,4.0]).reshape(1,-1))response=client.invoke_endpoint(EndpointName=endpoint_name,ContentType='application/json',Body=payload)print(response)

Error

ModelError:Anerroroccurred (ModelError)whencallingtheInvokeEndpointoperation:Receivedservererror (500)fromprimarywithmessage"<!DOCTYPE HTML PUBLIC "-//W3C//DTDHTML3.2Final//EN"><title>500InternalServerError</title><h1>InternalServerError</h1><p>Theserverencounteredaninternalerrorandwasunabletocompleteyourrequest.Eithertheserverisoverloadedorthereisanerrorintheapplication.</p>

Questions

How can I consume an endpoint deployed from SageMaker with MLflow in another notebook or service (e.g., Lambda)?
What could be causing this 500 error, and how can I troubleshoot it?

You must be logged in to vote

Replies: 1 comment

Comment options

@sergioCancanEs Make sure your deployed endpoint is healthy as SageMaker checks for health first and then make sure your lambda function has sagemaker: invoke endpoint permission added to the IAM role attached to it.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@sergioCancanEs@rahulmisal27

[8]ページ先頭

©2009-2025 Movatter.jp