Amazon SageMaker is a fully managed service that allows developers and data scientists to build, train, and deploy machine learning models.
Amazon SageMaker includes three modules: Build, Train, and Deploy. The Build module provides a hosted environment to work with your data, experiment with algorithms, and visualize your output. The Train module allows for one-click model training and tuning at high-scale and low cost. The Deploy module provides a managed environment for you to easily host and test models for inference securely and with low latency.
Amazon SageMaker provides fully managed instances running Jupyter notebooks for training data exploration and preprocessing. These notebooks are pre-loaded with CUDA and cuDNN drivers for popular deep learning platforms, Anaconda packages, and libraries for TensorFlow, Apache MXNet, Chainer, and PyTorch.
In just one click, you can access a fully managed machine learning notebook environment using the popular Jupyter open source notebook format.
These notebook workspaces let you explore and visualize your data and document your findings in re-usable workflows using virtually all popular libraries, frameworks, and interfaces. From within the notebook, you can bring in your own data already stored in Amazon S3. You can also use AWS Glue to easily move data from Amazon RDS, Amazon DynamoDB, and Amazon Redshift into S3 for analysis. You can write or import your own notebook or use one of many pre-built notebooks that are pre-loaded into Amazon SageMaker. Pre-built notebooks are available for all of the built-in machine learning algorithms. In addition, notebook templates are available to help you get started with common ML applications and more advanced Amazon SageMaker functionality.
|Templates for Common ML applications
Templates for advanced SageMaker functionality
Bring your own TensorFlow, MXNet, and Chainer containers
Targeted direct marketing
Bring your own scikit or R algorithm or model
Predicting customer churn
Data sharding in distributed training
Amazon SageMaker provides high-performance, scalable machine learning algorithms optimized for speed, scale, and accuracy. These algorithms can perform training on petabyte-scale datasets and provide up to 10x the performance of other implementations. You can choose from supervised algorithms where the correct answers are known during training and you can instruct the model where it made mistakes. Amazon SageMaker includes supervised algorithms such as XGBoost and linear/logistic regression or classification, to address recommendation and time series prediction problems. Amazon SageMaker also include support for unsupervised learning (i.e. the algorithms must discover the correct answers on their own), such as with k-means clustering and principal component analysis (PCA), to solve problems like identifying customer groupings based on purchasing behavior.
Amazon SageMaker makes the most common machine learning algorithms automatically available to you. You simply specify your data source, and you can start running k-means clustering for data segmentation, factorization machines for recommendations, time-series forecasting, linear regression, or principal component analysis, right away.
|BlazingText Word2Vec||BlazingText implementation of the Word2Vec algorithm for scaling and accelerating the generation of word embeddings from a large number of documents.|
|DeepAR||An algorithm that generates accurate forecasts by learning patterns from many related time-series using recurrent neural networks (RNN).|
|Factorization Machines||A model with the ability to the estimate all of the interactions between features even with a very small amount of data.|
|Gradient Boosted Trees (XGBoost)||Short for “Extreme Gradient Boosting”, XGBoost is an optimized distributed gradient boosting library.|
|Image Classification (ResNet)||A popular neural network for developing image classification systems.|
|K-Means Clustering||One of the simplest ML algorithms. It’s used to find groups within unlabeled data.|
Latent Dirichlet Allocation (LDA)
|A model that is well suited to automatically discovering the main topics present in a set of text files.|
|Linear Learner (Classification)||Linear classification uses an object’s characteristics to identify the appropriate group that it belongs to.
|Linear Learner (Regression)||Linear regression is used to predict the linear relationship between two variables.
|Neural Topic Modelling (NTM)||A neural network based approach for learning topics from text and image datasets.|
|Principal Component Analysis (PCA)||Often used in data pre-processing, this algorithm takes a table or matrix of many features and reduces it to a smaller number of representative features.|
|Random Cut Forest||An unsupervised machine learning algorithm for anomaly detection.|
|Seqence2Sequence||A general-purpose encoder-decoder for text that is often used for machine translation, text summarization, etc.|
These algorithms have been optimized so that their performance is up to 10x faster than what you’d achieve in traditional implementations. One of the ways we’ve done this is to implement these algorithms so that they don’t need to go back and look at data they’ve already seen. Traditionally, algorithms often pass back through your data set multiple times to reference earlier data. This is ok with small data sets, but the performance hit with large data sets can significantly slow down training. By engineering for a single pass, you’re able to efficiently and cost-effectively train on petabyte-scale data sets.
Amazon SageMaker automatically configures and optimizes TensorFlow, Apache MXNet, Chainer, and PyTorch, so you don’t have to do any setup to start using these frameworks, and we’ll add other major frameworks in the coming months. However, you can always bring any framework you like to Amazon SageMaker by building it into a Docker container that you store in the Amazon EC2 Container Registry.
The open source Apache MXNet and Tensorflow Docker containers used in Amazon SageMaker are available on Github. You can download these containers to your local environment and use the Amazon SageMaker Python SDK to test your scripts before deploying to Amazon SageMaker training or hosting environments. When you’re ready go from local testing to production training and hosting, a change to a single line of code is all that's needed.
When you’re ready to train in Amazon SageMaker, simply specify the location of your data in Amazon S3, and indicate the type and quantity of Amazon SageMaker ML instances you need, and get started with a single click in the console. Amazon SageMaker sets up a distributed compute cluster, performs the training, outputs the result to Amazon S3, and tears down the cluster when complete.
Training models is easy with Amazon SageMaker; just specify the location of your data in S3, and Amazon SageMaker will take your algorithm and run it on a training cluster isolated within its own software defined network, configured to your needs. Just choose the instance type – including P3 GPU instances, which are ideal for fast and efficient training - and Amazon SageMaker will create your cluster in an auto-scaling group; attach EBS volumes to each node; setup the data pipelines; and start training with your TensorFlow, MXNet, Chainer or PyTorch script, Amazon’s own algorithms, or your algorithms provided by your own container. Once finished, it will output the results to S3 and automatically tear down the cluster.
To make it easy to conduct training at scale, we’ve optimized how training data streams from S3. Through the API, you can specify if you’d like all of the data to be sent to each node in the cluster, or if you’d like Amazon SageMaker to manage the distribution of data across the nodes depending on the needs of your algorithm.
Combined with the built-in algorithms, the scalability of training that’s possible with Amazon SageMaker can dramatically reduce the time and cost of training runs.
Amazon SageMaker can automatically tune your model by adjusting thousands of different combinations of algorithm parameters, to arrive at the most accurate predictions the model is capable of producing.
When you’re tuning your model to be more accurate, you have two big levers to pull, modifying the data inputs you provide the model (for example, taking the log of a number), and adjusting the parameters of the algorithm. These are called hyperparameters, and finding the right values can be tough. Typically, you’ll start with something random and iterate through adjustments as you begin to see what effect the changes have. It can be a long cycle depending on how many hyperparameters your model has.
Amazon SageMaker simplifies this by offering automatic model tuning as an option during training. Amazon SageMaker will actually use machine learning to tune your machine learning model. It works by learning what affects different types of data have on a model and applying that knowledge across many copies of the model to quickly seek out the best possible outcome. As a developer or data scientist, this means you only really need to be concerned with the adjustments you want to make to the data you feed the model, which greatly reduces the number of things to worry about during training.
When initiating automatic model tuning, you simply specify the number of training jobs through the API and Amazon SageMaker handles the rest.
You can one-click deploy your model onto auto-scaling Amazon ML instances across multiple availability zones for high redundancy. Just specify the type of instance, and the maximum and minimum number desired, and Amazon SageMaker takes care of the rest. It will launch the instances, deploy your model, and set up the secure HTTPS endpoint for your application. Your application simply needs to include an API call to this endpoint to achieve low latency / high throughput inference. This architecture allows you to integrate your new models into your application minutes, because model changes no longer require application code changes.
Amazon SageMaker can also manage model A/B testing for you. You can configure the endpoint to spread traffic across as many as five different models and set the percentage of inference calls you want each one to handle. You can change all of this on the fly, giving you a lot of flexibility to run experiments and determine which model produces the most accurate results in the real world.
Amazon SageMaker manages your production compute infrastructure on your behalf to perform health checks, apply security patches, and conduct other routine maintenance, all with built-in Amazon CloudWatch monitoring and logging