Book Image

Amazon SageMaker Best Practices

By : Sireesha Muppala, Randy DeFauw, Shelbee Eigenbrode
Book Image

Amazon SageMaker Best Practices

By: Sireesha Muppala, Randy DeFauw, Shelbee Eigenbrode

Overview of this book

Amazon SageMaker is a fully managed AWS service that provides the ability to build, train, deploy, and monitor machine learning models. The book begins with a high-level overview of Amazon SageMaker capabilities that map to the various phases of the machine learning process to help set the right foundation. You'll learn efficient tactics to address data science challenges such as processing data at scale, data preparation, connecting to big data pipelines, identifying data bias, running A/B tests, and model explainability using Amazon SageMaker. As you advance, you'll understand how you can tackle the challenge of training at scale, including how to use large data sets while saving costs, monitoring training resources to identify bottlenecks, speeding up long training jobs, and tracking multiple models trained for a common goal. Moving ahead, you'll find out how you can integrate Amazon SageMaker with other AWS to build reliable, cost-optimized, and automated machine learning applications. In addition to this, you'll build ML pipelines integrated with MLOps principles and apply best practices to build secure and performant solutions. By the end of the book, you'll confidently be able to apply Amazon SageMaker's wide range of capabilities to the full spectrum of machine learning workflows.
Table of Contents (20 chapters)
Section 1: Processing Data at Scale
Section 2: Model Training Challenges
Section 3: Manage and Monitor Models
Section 4: Automate and Operationalize Machine Learning

What this book covers

Chapter 1, Amazon SageMaker Overview, provides a high-level overview of the Amazon SageMaker capabilities that map to the various phases of the machine learning process. This sets a foundation for a best practice discussion of using SageMaker capabilities to handle data science challenges.

Chapter 2, Data Science Environments, provides a brief overview of technical requirements along with a discussion on setting up the necessary data science environments using Amazon SageMaker. This sets the foundation for building and automating ML solutions throughout the rest of the book.

Chapter 3, Data Labeling with Amazon SageMaker Ground Truth, kicks off with a review of challenges involved in labeling data at scale – costs, time, unique labeling needs, inaccuracies, and bias. Best practices to use Amazon SageMaker Ground Truth to address the challenges identified are discussed.

Chapter 4, Data Preparation at Scale Using Amazon SageMaker Data Wrangler and Processing, kicks off with a review of challenges involved in data preparation at scale – compute/memory resource constraints, long processing times, along with the challenges of the duplication of feature engineering efforts, bias detection, and understanding feature importance. A discussion on Amazon SageMaker capabilities to address these challenges along with best practices to apply follows.

Chapter 5, Centralized Feature Repository with Amazon SageMaker Feature Store, provides best practices for using a centralized repository for features built with Amazon SageMaker Feature Store. Techniques to ingest features and provide access to features to satisfy access time requirements are discussed.

Chapter 6, Training and Tuning at Scale, provides best practices for training and tuning machine learning models with large datasets using Amazon SageMaker. Techniques such as distributed training with data and model parallelism, automated model tuning, and grouping multiple training jobs to identify the best performing job are discussed.

Chapter 7, Profile Training Jobs with Amazon SageMaker Debugger, discusses best practices to debug, monitor, and profile training jobs to detect long-running non-converging jobs and eliminate resource bottlenecks. The monitoring and profiling capabilities offered by Amazon SageMaker Debugger help improve training time and reduce training costs.

Chapter 8, Managing Models at Scale Using a Model Registry, introduces SageMaker Model Registry as a centralized catalog of trained models. Models can be deployed from the registry and the metadata maintained in the registry is useful to understand the deployment history of an individual model. Model Registry is an important component of addressing the challenge of model deployment automation with CI/CD.

Chapter 9, Updating Production Models Using Amazon SageMaker Endpoint Production Variants, addresses the challenge of updating models in production with minimal disruption to the model consumers using Amazon SageMaker Endpoint production variants. The same production variants will be used to showcase advanced strategies such as canary deployments, A/B testing, blue/green deployments that balance cost with downtime, and ease of rollbacks.

Chapter 10, Optimizing Model Hosting and Inference Costs, introduces best practices to optimize hosting and inference costs on Amazon SageMaker. Multiple deployment strategies are discussed to meet the computation needs and response time requirements under varying inference traffic demands.

Chapter 11, Monitoring Production Models with Amazon SageMaker Model Monitor and Clarify, introduces best practices to monitor the quality of production models and receive proactive alerts on model quality degradation. You will learn how to monitor for data bias, model bias, bias drift, and feature attribution drift using Amazon SageMaker Model Monitor and SageMaker Clarify.

Chapter 12, Machine Learning Automated Workflows, brings together data processing, training, deployment, and model management into automated workflows that can be orchestrated and integrated into end-to-end solutions.

Chapter 13, Well-Architected Machine Learning with Amazon SageMaker, applies best practices provided by the AWS Well-Architected Framework to building ML solutions on Amazon SageMaker.

Chapter 14, Managing SageMaker Features across Accounts, discusses best practices for using Amazon SageMaker capabilities in a cross-account setup involving multiple AWS accounts, which allows you to better govern and manage machine learning activities across the machine learning development lifecycle.