Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Amazon SageMaker Best Practices

You're reading from   Amazon SageMaker Best Practices Proven tips and tricks to build successful machine learning solutions on Amazon SageMaker

Arrow left icon
Product type Paperback
Published in Sep 2021
Publisher Packt
ISBN-13 9781801070522
Length 348 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Randy DeFauw Randy DeFauw
Author Profile Icon Randy DeFauw
Randy DeFauw
Shelbee Eigenbrode Shelbee Eigenbrode
Author Profile Icon Shelbee Eigenbrode
Shelbee Eigenbrode
Sireesha Muppala Sireesha Muppala
Author Profile Icon Sireesha Muppala
Sireesha Muppala
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Section 1: Processing Data at Scale
2. Chapter 1: Amazon SageMaker Overview FREE CHAPTER 3. Chapter 2: Data Science Environments 4. Chapter 3: Data Labeling with Amazon SageMaker Ground Truth 5. Chapter 4: Data Preparation at Scale Using Amazon SageMaker Data Wrangler and Processing 6. Chapter 5: Centralized Feature Repository with Amazon SageMaker Feature Store 7. Section 2: Model Training Challenges
8. Chapter 6: Training and Tuning at Scale 9. Chapter 7: Profile Training Jobs with Amazon SageMaker Debugger 10. Section 3: Manage and Monitor Models
11. Chapter 8: Managing Models at Scale Using a Model Registry 12. Chapter 9: Updating Production Models Using Amazon SageMaker Endpoint Production Variants 13. Chapter 10: Optimizing Model Hosting and Inference Costs 14. Chapter 11: Monitoring Production Models with Amazon SageMaker Model Monitor and Clarify 15. Section 4: Automate and Operationalize Machine Learning
16. Chapter 12: Machine Learning Automated Workflows 17. Chapter 13:Well-Architected Machine Learning with Amazon SageMaker 18. Chapter 14: Managing SageMaker Features across Accounts 19. Other Books You May Enjoy

Feature tour of model-building capabilities

In this section, we'll dive into SageMaker's model-building capabilities. By the end of this section, you should understand when to use SageMaker Studio or SageMaker notebook instances, and how to choose between SageMaker's built-in algorithms, frameworks, and libraries, versus a bring your own (BYO) approach.

SageMaker Studio

SageMaker Studio is an integrated development environment (IDE) for ML. It brings together Jupyter notebooks, experiment management, and other tools into a unified user interface. You can easily share notebooks and notebook snapshots with other team members using Git or a shared filesystem. The following screenshot shows an example of one of SageMaker Studio's built-in visualizations:

Figure 1.9 – SageMaker Studio showing an experiment graph

Figure 1.9 – SageMaker Studio showing an experiment graph

SageMaker Studio can be used in all phases of the ML life cycle.

SageMaker notebook instances

If you prefer a more traditional Jupyter or JupyterLab experience, and you don't need the additional integrations and collaboration tools that Studio provides, you can use a regular SageMaker notebook instance. You choose the notebook instance compute capacity (that is, whether you want GPUs and how much storage you need), and SageMaker provisions the environment with the Jupyter Notebook and JupyterLab and several of the common ML frameworks and libraries installed.

The notebook instance also supports Docker in case you want to build and test containers with ML code locally. Best of all, the notebook instances come bundled with over 100 example notebooks. The following figure shows an example of the JupyterLab interface in a notebook:

Figure 1.10 – JupyterLab interface in a SageMaker notebook, showing a list of example notebooks

Figure 1.10 – JupyterLab interface in a SageMaker notebook, showing a list of example notebooks

Similar to SageMaker Studio, you can perform almost any part of the ML life cycle in a notebook instance.

SageMaker algorithms

SageMaker bundles open source and proprietary algorithms for many common ML use cases. These algorithms are a good starting point as they are tuned for performance, often supporting distributed training. The following table lists the SageMaker algorithms provided for different types of ML problems:

Figure 1.11 – SageMaker algorithms for various ML scenarios

Figure 1.11 – SageMaker algorithms for various ML scenarios

BYO algorithms and scripts

If you prefer to write your own training and inference code, you can work with a supported ML, graph, or RL framework, or bundle your own code into a Docker image. The BYO approach works well if you already have a library of model code, or if you need to build a model for a use case where a pre-built algorithm doesn't work well. Data scientists who use R like to use this approach. SageMaker supports the following frameworks:

  • Supported machine learning frameworks: XGBoost, sklearn
  • Supported deep learning frameworks: TensorFlow, PyTorch, MXNet, Chainer
  • Supported reinforcement learning frameworks: Ray RLLib, Coach
  • Supporting graph frameworks: Deep Graph Library

Now that we've introduced several SageMaker capabilities for model building, let's move on to training and tuning capabilities.

You have been reading a chapter from
Amazon SageMaker Best Practices
Published in: Sep 2021
Publisher: Packt
ISBN-13: 9781801070522
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime