Professional Documents
Culture Documents
Learning in AWS
Emily Robinson
bit.ly/awsdogs
This talk will cover: This talk won’t cover:
• The why and what of “the cloud” and • ML using any other cloud
Amazon Web Services (AWS) technology
• Connecting to AWS from Python • The math/theory behind the model
• Helpful AWS terms/libraries • Any other algorithms
• Using those libraries to: • How to make a good model
• Upload images to Amazon’s storage
system, S3
• Train an image classification model
• Evaluate the model’s performance
• How to learn more!
Background
AWS and my learning journey
What is the Cloud?
What is AWS?
*https://aws.amazon.com/products/
What is AWS SageMaker?
*https://aws.amazon.com/sagemaker/
Why the Cloud?
Why the Cloud?
• Get access to a super computer
• Unless you want to buy* a $5,500 NVIDIA GPU, you probably can’t train a
128-layer neural network on millions of images on your laptop
• Can start with their model “blueprint”
• Full pipeline – store your data, train your model, create an endpoint
for real-time inference, monitor performance
https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/
Create your keys
Create your keys
Save your credentials to ~/.aws/credentials
Install and import the python packages
Create the S3 Client and bucket
Upload images
(Optional) View files in S3
https://console.aws.amazon.com/s3
Create tables of image info
Upload tables
SageMaker Code
SageMaker has a high and low level API
In general AWS has many ways to do something
In general AWS has many ways to do something
Create IAM SageMaker Role
https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html
Get Role ARN
Create Estimator
Set Hyperparameters
Create Data Channels, Format & Location of Your Data
Train Model
(Optional) View Training Job
https://console.aws.amazon.com/sagemaker/home?region=us-east-1#/jobs
(Optional) View Training Job
https://console.aws.amazon.com/sagemaker/home?region=us-east-1#/jobs
View Training Job Logs
View Training Job Logs
Generate Predictions with Batch Transform Job
Fetch Predictions
Spoiler Alert: How’d the model end up
doing?
bit.ly/awsdogs_py
hookedondata.org
datascicareer.com