Train Then Deploy
A 6-step recipe with Amazon SageMaker. We can help you get access.
Recipe · 6 steps
Train Then Deploy
with Amazon SageMaker · Artificial Intelligence Management
Train a model and, on success, deploy the trained artifacts to an endpoint.
- Start a model training job using the supplied algorithm image, IAM role, input data, output location, and compute resources.
- Describe the training job to read its current status. Repeat while the status remains InProgress; on a terminal status branch on whether training completed.
- Register a model from the inference container and the S3 artifacts the training job produced.
- Define an endpoint configuration that places the trained model on a single production variant.
- Create a hosted endpoint from the endpoint configuration so SageMaker provisions resources and deploys the trained model.
- Describe the endpoint and loop while it remains in the Creating state, continuing once it reaches a terminal state.
What you'll need to have ready
- trainingJobName: A unique name for the training job.
- trainingImage: The registry path of the Docker image that contains the training algorithm.
- trainingInputMode: The input mode the algorithm supports (Pipe or File).
- roleArn: The ARN of the IAM role SageMaker assumes for training and hosting.
- inputDataConfig: The input data channels for the training job.
- s3OutputPath: The S3 path where SageMaker stores the model artifacts.
- instanceType: The ML compute instance type to use for training.
- instanceCount: The number of ML compute instances to use for training.
- volumeSizeInGB: The size of the ML storage volume attached to each training instance, in GB.
- maxRuntimeInSeconds: The maximum length of time, in seconds, that the training job can run.
- modelName: A unique name for the model to register from the trained artifacts.
- inferenceImage: The registry path of the Docker image that contains the inference code.
For your developer
Arazzo workflow amazon-sagemaker:train-then-deploy, 6 operations: CreateTrainingJob → DescribeTrainingJob → CreateModel → CreateEndpointConfig → CreateEndpoint → DescribeEndpoint. Specs on APIs.io.