Amazon SageMaker
AWS machine learning service covering preparation, training, tuning and hosting, with infrastructure provisioned per job.
Amazon SageMaker is the AWS service for machine learning. It covers preparing data, training models, tuning their settings and hosting them for predictions. Its central characteristic is that infrastructure is provisioned for each job and released when it finishes, so training machines are not kept running between runs.
What SageMaker is for
Amazon SageMaker is the AWS machine learning service. It spans the work from preparing data through training and tuning to hosting a model for predictions.
The characteristic that shapes how it is used is that infrastructure is provisioned per job.
Jobs rather than servers
Machine learning has an awkward hardware profile. Training may need several accelerator machines for four hours, and then nothing for three days.
Buying that hardware means paying for it continuously and using it occasionally. Keeping cloud machines running has the same problem in a different form.
SageMaker's model is the job. You describe what you want run and what machines it needs. The service provisions them, retrieves your code and data, runs the training, writes the model to storage and releases the machines.
Cost follows use. Accelerator time is paid for while it is being used.
Why that makes tuning practical
The job model has a consequence that matters more than it first appears.
Finding good settings for a model means trying many combinations. Done on fixed hardware, trials run one after another, and a search of fifty configurations takes fifty times as long as one.
Because each trial is its own job, they can run at the same time. A search that would take days sequentially completes in the time of the slowest trial plus scheduling.
Automatic tuning uses this directly. You give a range for each setting and the metric to optimise, and the service runs the trials and reports the best.
Endpoints
Training produces a model. Something then has to serve it.
Built from scratch, that means a service that loads the model, exposes an interface, scales with demand, handles failures and can be updated without downtime. It is a real engineering project, and it is not machine learning work.
An endpoint provides it. A trained model is deployed and applications call it for predictions, with the service managing what sits behind.
For predictions over a large stored data set rather than one at a time, a batch job applies the model across the data and writes results back to storage.
The development environment
An integrated workspace provides notebooks and tooling with access to the rest of the service, so exploration, launching jobs and reviewing results happen in one place.
Who uses SageMaker
SageMaker is used by teams building machine learning on AWS, particularly those whose data already sits in AWS storage and who would rather not operate training and serving infrastructure.
Points to consider
It is an AWS service, so it is efficient inside that environment and specific to it.
The service is also broad, and much of the learning is working out which components a given task needs. Not every project needs tuning jobs, batch scoring and a hosted endpoint.
Cost needs attention despite the per job model. Accelerator machines are expensive by the hour, a tuning job with many parallel trials multiplies that, and an endpoint left running is billed continuously whether it is receiving requests or not.
Getting started
The developer guide covers setting up permissions and storage, running a first training job, deploying an endpoint and using automatic tuning. Training a model from a provided example and deploying it to an endpoint covers the main path end to end.
Key features of Amazon SageMaker
Capabilities described in the official documentation.
Training jobs with their own machines
A training job provisions the machines it needs, runs and releases them, so nothing sits idle afterwards.
Hosted endpoints
A trained model is deployed as an endpoint that applications call, with the hosting managed by the service.
Automatic parameter tuning
The service runs many training jobs across a search space and reports which settings performed best.
A development environment
An integrated workspace provides notebooks and tooling with access to the rest of the service.
Advantages of Amazon SageMaker
Factual advantages that follow from the features above.
Expensive hardware is rented by the job
Because machines exist only for the duration of a job, accelerator time is paid for when used rather than continuously.
Tuning can run in parallel
Because each trial is its own job, many configurations are evaluated at once rather than one after another.
Hosting is managed
Serving a model does not require building and operating the surrounding service infrastructure.
It fits the surrounding AWS estate
Documented links to AWS storage, permissions and monitoring avoid building those connections separately.
Common use cases for Amazon SageMaker
Situations the official documentation describes this tool as being used for.
Training on hardware you do not own
A job requests accelerator machines for a few hours, trains a model and releases them.
Serving predictions to an application
A hosted endpoint answers prediction requests from an application without a service being built for it.
Searching for good settings
A tuning job evaluates many configurations in parallel and reports the best performing one.
Batch scoring a large data set
A job applies a trained model across a stored data set and writes the predictions back to storage.
Official website
Everything on this page is based on the official documentation for Amazon SageMaker. You can read the source here.
Amazon SageMaker official documentation