概念
SageMaker hosting: model, endpoint config, endpoint
Three objects host a model: the model, the endpoint configuration and the endpoint.
このレッスンはまだ翻訳されていないため、英語で表示しています。
- 1create_model names the container image, the artifacts in S3 and the execution role.
- 2create_endpoint_config lists the variants: model, instance type, count and weight.
- 3create_endpoint reads the config and starts the instances.
- 4The application calls the endpoint through the SageMaker Runtime.
流れ
- 1create_model names the container image, the artifacts in S3 and the execution role.
- 2create_endpoint_config lists the variants: model, instance type, count and weight.
- 3create_endpoint reads the config and starts the instances.
- 4The application calls the endpoint through the SageMaker Runtime.
Each object points to the one before it.
Boto3
- Create
- create_model, create_endpoint_config, create_endpoint
- Invoke
- sagemaker-runtime invoke_endpoint
SageMaker Python SDK
- Create
- One deploy call makes all three
- Invoke
- Call the endpoint object
AWS CLI
- Create
- aws sagemaker create-model and the two next calls
- Invoke
- aws sagemaker-runtime invoke-endpoint
| Way | Create | Invoke |
|---|---|---|
| Boto3 | create_model, create_endpoint_config, create_endpoint | sagemaker-runtime invoke_endpoint |
| SageMaker Python SDK | One deploy call makes all three | Call the endpoint object |
| AWS CLI | aws sagemaker create-model and the two next calls | aws sagemaker-runtime invoke-endpoint |
概要
Hosting a model on Amazon SageMaker AI takes three objects. The model names the container image, the model artifacts in Amazon S3 and the execution role. The endpoint configuration lists one or more production variants: a model, an instance type, an instance count and a traffic weight. The endpoint is the running service built from that configuration.
概要
You create them in order with create_model, create_endpoint_config and create_endpoint. The SageMaker Python SDK wraps all three in one deploy call. Boto3 and the AWS CLI expose each call. Clients do not get predictions from the SageMaker API. They use the SageMaker Runtime, a separate client: invoke_endpoint in Boto3, or aws sagemaker-runtime invoke-endpoint in the CLI.
概要
To change a live endpoint, create a new endpoint configuration and call update_endpoint. SageMaker AI starts the new instances, shifts traffic, then removes the old ones, so the endpoint stays in service. Use update_endpoint_weights_and_capacities to change only weights or instance counts. An endpoint configuration cannot be edited after you create it.
覚えること
- Model: image, artifacts in S3, execution role. Endpoint config: variants. Endpoint: the running service.
- Order: create_model, create_endpoint_config, create_endpoint.
- Predictions go through SageMaker Runtime invoke_endpoint, not the SageMaker API.
- A production variant has a model, an instance type, an instance count and a weight.
覚えること
- To update with no downtime, make a new endpoint config and call update_endpoint.
- Delete the endpoint to stop paying. Its instances bill while it exists.
試験では
- “Change the instance type of a live endpoint without downtime” points to a new endpoint configuration and update_endpoint.
- “Send a prediction request from an application” points to the SageMaker Runtime invoke_endpoint call.
- “Split traffic between two model versions” points to two production variants with weights.
このタスクの内容 · 3.1
- Compute environments and deployment targets
- SageMaker hosting
- Real-time and serverless inference
- Asynchronous and batch inference
- Multi-model and multi-container endpoints, inference components
- Choosing a deployment orchestrator
- Foundation model deployment options
- Hosting large models on SageMaker
- Bringing in models built outside AWS
Agents Classic
AgentCore
- Agent protocols and multi-agent patterns
- Reranking and retrieval strategies