hands-on lab

Using SageMaker Notebooks to Train and Deploy Machine Learning Models

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 1,879
Rating: 4.4/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Amazon SageMaker notebooks provide a fully-managed environment for machine learning and data science development. You will use a SageMaker notebook instance to train and deploy a machine learning model using Python. You will go through the process of preparing raw data for use with machine learning algorithms. Then you will use a built-in SageMaker algorithm to train a model using the prepared data. Lastly, you will use SageMaker to host the trained model and learn how you can make real-time predictions using the model.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Use SageMaker notebook instances to run Jupyter Notebooks
  • Write code using the Python Data Analysis Library (pandas) and the SageMaker Python SDK to:
    • train models using built-in SageMaker algorithms
    • Create SageMaker models
    • Deploy SageMaker endpoints to get real-time inferences from your models

Intended Audience

This lab is intended for:

  • Anyone interested in using SageMaker to build and deploy machine learning models in code

Prerequisites

You should be familiar with:

  • Some knowledge of machine learning concepts is beneficial, but not required
  • Basic programming using Python 3
  • Completion of the Forecast Flight Delays with Amazon SageMaker lab is recommended for a deeper understanding of the data used in this lab 
  • Basic S3 concepts

Updates

September 7th, 2023 - Resolved an issue installing package dependencies in the lab notebook

June 17th, 2023 - Resolved training job issue

January 10th, 2022 - Updated notebook to ensure dependencies are up to date

December 2nd, 2020 - Updated code to be compliant with the SageMaker v2 library; Modified code to prevent training job name collisions

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Opening JupyterLab on Your SageMaker Notebook
Working Through the Lab's JupyterLab Notebook