aws / aws/amazon-sagemaker-examples
Sagemaker runtime_client.invoke_endpoint not handling redirect
- Dominant language
- Jupyter Notebook
- Stars
- 11k
- Forks
- 7k
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 8
Description
Got a custom inference container on sagemaker. Addresses sagemaker /ping and /invocations on port 8080 as per spec.
However internally custom container redirects URI /invocations to a different /original_predict_uri.
===================================
response = runtime_client.invoke_endpoint(
EndpointName=endpoint_name, ContentType="application/json", Body=payload
)
result = response["Body"].read().decode("ascii")
'\nRedirecting...\n
Redirecting...
\nYou should be redirected automatically to target URL: http://localhost:9090/sunallscrtree1. If not click the link.'
============================
When I make a curl request to this container (outside sagemaker runtime) for this it addresses by passing --location to CURL /clients to follow HTTP redirects by default.
Can sagameker runtime address this redirects?
Sudhir
Contributor guide
Research direction
Start by reproducing the runtime_client.invoke_endpoint call against the custom inference container, then compare its response with the curl --location behavior described in the issue. The issue names no repository file or test; work is complete only when redirect handling has a confirmed implementation or documented resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- api, cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100