Book Image

Accelerate Deep Learning Workloads with Amazon SageMaker

By : Vadim Dabravolski
Book Image

Accelerate Deep Learning Workloads with Amazon SageMaker

By: Vadim Dabravolski

Overview of this book

Over the past 10 years, deep learning has grown from being an academic research field to seeing wide-scale adoption across multiple industries. Deep learning models demonstrate excellent results on a wide range of practical tasks, underpinning emerging fields such as virtual assistants, autonomous driving, and robotics. In this book, you will learn about the practical aspects of designing, building, and optimizing deep learning workloads on Amazon SageMaker. The book also provides end-to-end implementation examples for popular deep-learning tasks, such as computer vision and natural language processing. You will begin by exploring key Amazon SageMaker capabilities in the context of deep learning. Then, you will explore in detail the theoretical and practical aspects of training and hosting your deep learning models on Amazon SageMaker. You will learn how to train and serve deep learning models using popular open-source frameworks and understand the hardware and software options available for you on Amazon SageMaker. The book also covers various optimizations technique to improve the performance and cost characteristics of your deep learning workloads. By the end of this book, you will be fluent in the software and hardware aspects of running deep learning workloads using Amazon SageMaker.
Table of Contents (16 chapters)
1
Part 1: Introduction to Deep Learning on Amazon SageMaker
6
Part 2: Building and Training Deep Learning Models
10
Part 3: Serving Deep Learning Models

What this book covers

Chapter 1, Introducing Deep Learning with Amazon SageMaker, will introduce Amazon SageMaker: how it simplifies infrastructure and workload management, and what the key principles of this AWS service and its main capabilities are. We will then focus on the managed training, hosting infrastructure, and integration with the rest of the AWS services it provides.

Chapter 2, Deep Learning Frameworks and Containers on SageMaker, will review in detail how SageMaker extensively utilizes Docker containers. We will start by diving into pre-built containers for popular DL frameworks (Tensorflow, PyTorch, and MXNet). Then, we will consider how to extend pre-build SageMaker containers and BYO containers. For the latter case, we will review the technical requirements for training and serving containers in SageMaker.

Chapter 3, Managing SageMaker Development Environment, will discuss how to manage SageMaker resources programmatically using a CLI, SDKs, and CloudFormation. We will discuss how to organize an efficient development process using SageMaker Studio and Notebooks as well as how to integrate with your favorite IDE. We will also review troubleshooting your DL code using SageMaker Local Mode. We will review various SageMaker capabilities that allow us to organize and manage datasets and discuss various storage options on AWS and their application use cases.

Chapter 4, Managing Deep Learning Datasets, will provide practical guidance on setting up the first DL project on SageMaker and then building, training, and using a simple DL model. We will provide a follow-along implementation of this project so that readers can learn and experiment with the core SageMaker capabilities themselves.

Chapter 5, Considering Hardware for Deep Learning Training, will consider the price performance characteristics of the most suitable instances for DL models and cover in which scenarios to use one instance type or another for optimal performance.

Chapter 6, Engineering Distributed Training, will focus on understanding the common approaches to distributing your training processes and why you may need to do so for DL models. Then, we will provide an overview of both open source training distribution frameworks as well as innate SageMaker libraries for distributed training.

Chapter 7, Operationalizing Deep Learning Training, will discuss how to monitor and debug your DL training job using SageMaker Debugger and its Profiler as well as how to optimize for cost using Managed Spot Training, early stopping, and other strategies.

Chapter 8, Considering Hardware for Inference, will provide practical guidance on building NLP state-of-the-art models using the PyTorch and Hugging Face frameworks. Readers will follow along with the code to learn how to prepare a training script for distributed training on Amazon SageMaker and then monitor and further optimize the training job. We will use the SageMaker Data Parallel library for distributing training computations.

Chapter 9, Implementing Model Servers, will start by reviewing key components of SageMaker Managed Hosting, such as real-time endpoints and batch inference jobs, model registry, and serving containers. Readers will learn how to configure their endpoint deployment and batch inference jobs using a Python SDK.

Chapter 10, Operationalizing Inference Workloads, will focus on the software stack of DL servers, specifically, on model servers. We will review the model servers provided by the popular TensorFlow and PyTorch solutions as well as framework-agnostic model servers such as SageMaker Multi Model Server. We will discuss when to choose one option over another.