This repository contains a sequence of simple notebooks demonstrating how to move from an ML idea to production by using Amazon SageMaker.
The notebooks make use of SageMaker processing and training jobs, and SageMaker MLOps features such as SageMaker Pipelines, SageMaker Feature Store, SageMaker Model Registry, and SageMaker Model Monitor.
You start with a simple notebook with basic ML code for data preprocessing, feature engineering, and model training. Each subsequent notebook builds on top of the previous and introduce one or several SageMaker features:
Each notebook also provides links to useful SageMaker hands-on resources and proposes some ideas for additional development.
You follow along the six notebooks and develop your ML idea from an experimental notebook to a production-ready solution following the recommended MLOps practices:
You need an AWS account. If you don't already have an account, follow the Setting Up Your AWS Environment getting started guide for a quick overview.
If you participating in an AWS Immersion Day and would like to use a provided AWS account, please follow this instructions how to claim your AWS account via Event Engine and how to start SageMaker Studio. โ Skip the steps Set up Amazon SageMaker Studio domain and Deploy CloudFormation template if you use Event Engine and AWS-provisioned account.
To run the notebooks you can use SageMaker Studio which requires a SageMaker Studio domain.
An AWS account can have only one SageMaker Studio domain per Region. If you already have a SageMaker Studio domain in the US East (N. Virginia) Region, follow the SageMaker Studio setup guide to attach the required AWS IAM policies to your SageMaker Studio account. Skip the next step.
If you don't have an existing SageMaker Studio domain, you must deploy an AWS CloudFormation template that creates a SageMaker Studio domain and adds the permissions required for running the provided notebooks.
Choose this AWS CloudFormation stack link. The link opens the AWS CloudFormation console in your AWS account and creates your SageMaker Studio domain and a user profile named studio-user
. It also adds the required permissions to your SageMaker Studio domain. In the CloudFormation console, confirm that US East (N. Virginia) is the Region displayed in the upper right corner. Stack name should be CFN-SM-IM-Lambda-catalog
, and should not be changed. This stack takes about 10 minutes to create all the resources.
โ This stack assumes that you already have a public VPC set up in your account. If you do not have a public VPC, see VPC with a single public subnet to learn how to create a public VPC.
Select I acknowledge that AWS CloudFormation might create IAM resources, and then choose Create stack.
On the CloudFormation pane, choose Stacks. It takes about 10 minutes for the stack to be created. When the stack is created, the status of the stack changes from CREATE_IN_PROGRESS
to CREATE_COMPLETE
.
If you deployed the CloudFormation template, follow Log In from the Amazon SageMaker console instructions to open Studio.
Use studio-user
user profile to launch Studio:
To use the provided notebooks you must clone the source code repository into your Studio environment. Open a system terminal in Studio in the Launcher window:
Run the following command in the terminal:
git clone https://github.com/aws-samples/amazon-sagemaker-from-idea-to-production.git
The code repository will be downloaded and saved in your home directory in Studio.
Navigate to the Studio file browser inside the folder amazon-sagemaker-from-idea-to-production
. Open 00-start-here.ipynb
notebook and follow the instructions.
To avoid charges, you must remove all project-provisioned and generated resources from your AWS account. Run all steps in the provided clean-up notebook. If you provisioned a Studio domain for this workshop, and don't need the domain, you can delete the domain by following this instructions.
You don't need to perform a clean-up if you run an AWS-instructor led workshop.
This example uses the direct marketing dataset from UCI's ML Repository:
[Moro et al., 2014] S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success of Bank Telemarketing. Decision Support Systems, Elsevier, 62:22-31, June 2014
The following list presents some useful hands-on resources to help you to get started with ML development on Amazon SageMaker.
- Get started with Amazon SageMaker
- Amazon SageMaker 101 workshop
- Amazon SageMaker 101 workshop code repository
- Amazon SageMaker Immersion Day
- Amazon SageMaker End to End Workshop
- Amazon SageMaker workshop with BYOM and BYOC examples
- End to end Machine Learning with Amazon SageMaker
- SageMaker MLOps Workshop
- A curated list of awesome references for Amazon SageMaker
You can use the following QR code to link this repository.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0