AWS › Amazon SageMaker & Machine Learning on AWS
How does SageMaker handle model training, and what compute resources does it use?
BeginnerAnswer
SageMaker training jobs let you specify a training script or use a built in algorithm, point to your training data typically stored in S3, and choose the type and number of compute instances needed, and SageMaker automatically provisions those instances, runs the training job, saves the resulting model artifacts back to S3, and then automatically terminates the instances once training completes, meaning you only pay for the exact time spent training.
aws sagemaker create-training-job --training-job-name my-training-job --algorithm-specification TrainingImage=xgboost,TrainingInputMode=File --resource-config InstanceType=ml.m5.xlarge,InstanceCount=1,VolumeSizeInGB=10Real-world example A retail company trains a demand forecasting model using SageMaker, specifying that four large GPU instances should be used only for the two hours needed to complete training, avoiding the cost of keeping expensive hardware running continuously.