capabilities.work

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.

  1. Start a model training job using the supplied algorithm image, IAM role, input data, output location, and compute resources.
  2. Describe the training job to read its current status. Repeat while the status remains InProgress; on a terminal status branch on whether training completed.
  3. Register a model from the inference container and the S3 artifacts the training job produced.
  4. Define an endpoint configuration that places the trained model on a single production variant.
  5. Create a hosted endpoint from the endpoint configuration so SageMaker provisions resources and deploys the trained model.
  6. 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.