supercharge your ml model with amazon sagemaker and …...aws deeplens • fully programmable video...

19
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Atanu Roy Specialist Solutions Architect, AI and Deep Learning, AISPL Supercharge Your ML Model with Amazon SageMaker and Infer at the Edge using AWS DeepLens

Upload: others

Post on 20-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Atanu Roy

Specialist Solutions Architect, AI and Deep Learning, AISPL

Supercharge Your ML Model with Amazon SageMaker and Infer at the

Edge using AWS DeepLens

Page 2: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Inference at Edge

Transportation AR & VR Industrials

Smart Home Robotics Body Cameras

Page 3: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

AWS DeepLens

• Fully programmable video camera

• Intel Atom® Processor

• Intel Gen9 Graphics Engine

• Optimized for deep-learning on the device with Apache MXNet, Caffe, Tensorflow

• Integrated with Amazon SageMaker for custom models

Page 4: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Project Template

Page 5: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

DEMO

Page 6: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Page 7: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Architecture Amazon SageMaker

Model Artifacts

Amazon ECR

SageMaker ImageClassification

Algo

Training code

AWS DeepLens

AWS GreenGrass

AWS Lambda

Inference code

Inference code

Page 8: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Architecture

Poll and Speak Code

AWS DeepLens

AWS GreenGrass AWS IOT

IOT Topic Inference code

Amazon Sumerian

MQTT

Page 9: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Your Current Training Pipeline

Data Visualization & Analysis

Business Problem –

ML problem framing Data Collection

Data Integration

Data Preparation & Cleaning

Feature Engineering

Model Training & Parameter Tuning

Model Evaluation

Are Business Goals met?

Model Deployment

Monitoring & Debugging

– Predictions

Yes No

Data Augmentation

Feature

Augmentation

Re-training

Page 10: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Why We built Amazon SageMaker?

Data Visualization & Analysis

Business Problem –

ML problem framing Data Collection

Data Integration

Data Preparation & Cleaning

Feature Engineering

Model Training & Parameter Tuning

Model Evaluation

Are Business Goals met?

Model Deployment

Monitoring & Debugging

– Predictions

Yes No

Data Augmentation

Feature

Augmentation

Re-training

• Setup and manage Notebook Environments

• Setup and manage Training Clusters

• Write Data Connectors

• Scale ML algorithms to large datasets

• Distribute ML training algorithm to multiple machines

• Secure Model artifacts

Page 11: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

Why We built Amazon SageMaker?

Data Visualization & Analysis

Business Problem –

ML problem framing Data Collection

Data Integration

Data Preparation & Cleaning

Feature Engineering

Model Training & Parameter Tuning

Model Evaluation

Are Business Goals met?

Model Deployment

Monitoring & Debugging

– Predictions

Yes No

Data Augmentation

Feature

Augmentation

• Setup and manage Model Inference Clusters

• Manage and Auto-Scale Model Inference APIs

• Monitor and Debug Model Predictions

• Models versioning and performance tracking

• Automate New Model version promotion to production (A/B testing)

Re-training

Page 12: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Amazon Sagemaker

1 2 3 4

I I I I SM Notebooks Service SM Algorithms SM Training Service SM Hosting Service

High Performance Web-Scale

Algorithms Out Of The Box

Managed Distributed

model training service

Production Ready Model Hosting Requiring No

Engineering

Agile, Reliable, GPU powered, and

Productivity Ready Workspaces

for Data Scientist and Developers

Page 13: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

1

I

SM Notebooks Service

Zero Setup For Exploratory Data Analysis

Authoring & Notebooks

Connections to Spark on EMR

ETL Access to AWS Database services

Access to S3 Data Lake

• Recommendations/Personalization

• Fraud Detection

• Forecasting

• Image Classification

• Churn Prediction

• Marketing Email/Campaign Targeting

• Log processing and anomaly detection

• Speech to Text

• Optical Character Recognition

• Risk Modeling and Prediction

• Sentiment Analysis

“Just add data”

Page 14: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

2

I SM Algorithms

ML Algorithms Optimized for 10x speed and Large datasets

Training code

• Matrix Factorization • Regression • Principal Component Analysis • K-Means Clustering • Gradient Boosted Trees • Image Classification • Deep AR • Blazing Text • And More!

Amazon provided Algorithms

Bring Your Own Script (IM builds the Container)

SM Estimators in Apache Spark Bring Your Own Algorithm (You build the Container)

Page 15: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Managed Distributed Training With Flexibility

Training code

• Matrix Factorization • Regression • Principal Component Analysis • K-Means Clustering • Gradient Boosted Trees • And More!

Amazon provided Algorithms

Bring Your Own Script (IM builds the Container)

Bring Your Own Algorithm (You build the Container)

3

I SM Training Service

Fetch Training data

Save Model Artifacts

Fully managed –

Secured –

Cost Effective

I

Amazon ECR

Save Inference Image

IM Estimators in Apache Spark

CPU GPU HPO

Page 16: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

4

I SM Hosting Service

Amazon ECR

Amazon SM

Easy Model Deployment to SM Hosting

30 50

10 10

InstanceType: c3.4xlarge MinInstanceCount: 5 MaxInstanceCount: 20 ModelName: prod VariantName: prodPrimary VariantWeight: 50

ProductionVariant

Model Artifacts

Inference Image

Model versions

Versions of the same inference code saved in inference containers. Prod is the primary one, 50% of the traffic must be served there! One-Click!

EndpointConfiguration

Inference Endpoint

Amazon Provided Algorithms

Page 17: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Let’s Build

Page 18: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Page 19: Supercharge Your ML Model with Amazon SageMaker and …...AWS DeepLens • Fully programmable video camera • Intel Atom® Processor • Intel Gen9 Graphics Engine • Optimized for

© 2018, Amazon Web Services, Inc. or its affiliates. All rights

reserved.

Thank you!