SlideShare a Scribd company logo
1 of 62
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Randall Hunt – Some Guy From Los Angeles
@WhereML a Serverless AI Powered Location
Guessing Twitter Bot
Built with Amazon SageMaker and AWS Lambda
Based on LocationNet work by Jaeyoung Choi and Kevin Li
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
About Me
• Technical Evangelist at AWS
• I build some demos: https://github.com/ranman
• I write some blogs: https://aws.amazon.com/blogs/aws/author/randhunt/
• Formerly of SpaceX, NASA, MongoDB
• I like Python
• I dislike javascript
• I look ridiculous in my badge photo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Example
Try it! Tweet to
@WhereML with a picture.
Hold your cell phone
camera to the screen
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Architecture
AWS Lambda FunctionAmazon API
Gateway
Amazon SageMaker
Model Artifacts
Inference
Endpoint
Inference code
Amazon ECR
Inference code
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Solving Some Of The Hardest Problems In Computer Science
Learning Language Perception Problem
Solving
Reasoning
The (60 year) rise of Artificial Intelligence
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Put machine learning in the hands of every developer
and data scientist
ML @ AWS: Our mission
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer Running ML on AWS Today
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Reviewing The ML Process
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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
YesNo
DataAugmentation
Feature
Augmentation
The Machine Learning Process
Re-training
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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
YesNo
DataAugmentation
Feature
Augmentation
Discovery: The Analysts
Re-training
• Help formulate the right
questions
• Domain Knowledge
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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
YesNo
DataAugmentation
Feature
Augmentation
Integration: The Data Architecture
Retraining
• Build the data platform:
• Amazon S3
• AWS Glue
• Amazon Athena
• Amazon EMR
• Amazon Redshift
Spectrum
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data Visualization &
Analysis
Feature Engineering
Model Training &
Parameter Tuning
Model Evaluation
• 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
Why We built Amazon SageMaker: The Model Training Undifferentiated Heavy Lifting
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Business Problem –
Model Deployment
Monitoring &
Debugging
– Predictions
• Setup and manage Model
Inference Clusters
• Manage and Scale Model
Inference APIs
• Monitor and Debug Model
Predictions
• Models versioning and
performance tracking
• Automate New Model
version promotion to
production (A/B testing)
Why We built Amazon SageMaker: The Model Deployment Undifferentiated Heavy Lifting
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A fully managed service that enables data scientists and
developers to quickly and easily build machine-learning
based models into production smart applications.
Amazon SageMaker
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
1 2 3 4
I I I I
Notebook Instances Algorithms ML Training Service ML Hosting Service
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1
I
Notebook Instances
Zero Setup For Exploratory Data Analysis
Authoring &
Notebooks
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
• More…
“Just add data”
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Streaming datasets,
for cheaper training
Train faster, in a
single pass
Greater reliability on
extremely large
datasets
Choice of several ML
algorithms
Amazon SageMaker: 10x better algorithms
2
I
Algorithms
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cost vs. Time
$$$$
$$$
$$
$
Minutes Hours Days Weeks Months
Single
Machine
Distributed, with
Strong Machines
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infinitely Scalable ML Algorithms
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2
I
Algorithms
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)
IM Estimators in
Apache Spark Bring Your Own Algorithm (You build the Container)
Amazon SageMaker: 10x better algorithms
© 2017, 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
ML Training Service
Fetch Training data
Save Model Artifacts
Fully
managed –
Secured–
Amazon ECR
Save Inference Image
IM Estimators in
Apache Spark
CPU GPU HPO
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
Versions of the same
inference code saved in
inference containers.
Prod is the primary one,
50% of the traffic must
be served there!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
Model Artifacts
Inference Image
Versions of the same
inference code saved in
inference containers.
Prod is the primary one,
50% of the traffic must
be served there!
Create a Model
ModelName: prod
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
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!
Create versions of a Model
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
30 50
10 10
InstanceType: c3.4xlarge
InitialInstanceCount: 3
ModelName: prod
VariantName: primary
InitialVariantWeight: 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!
Create weighted
ProductionVariants
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
30 50
10 10
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!
Create an
EndpointConfiguration from
one or many
ProductionVariant(s)EndpointConfiguration
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
InstanceType: c3.4xlarge
InitialInstanceCount: 3
ModelName: prod
VariantName: primary
InitialVariantWeight: 50
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
30 50
10 10
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! Create an Endpoint from
one EndpointConfiguration
EndpointConfiguration
Inference Endpoint
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
InstanceType: c3.4xlarge
InitialInstanceCount: 3
ModelName: prod
VariantName: primary
InitialVariantWeight: 50
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
Amazon ECR
30 50
10 10
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
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
InstanceType: c3.4xlarge
InitialInstanceCount: 3
ModelName: prod
VariantName: primary
InitialVariantWeight: 50
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
I
ML Hosting Service
 Auto-Scaling Inference
APIs
 A/B Testing (more to
come)
 Low Latency & High
Throughput
 Bring Your Own Model
 Python SDK
Amazon SageMaker
Easy Model Deployment to Amazon SageMaker
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Building the Model
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Credits
• This model, LocationNet, was built by Jaeyoung Choi of
the International Computer Science Institute and Kevin
Li of the University of California, Berkley
• Supported by the AWS Cloud Credits for Research
Program
• Based on work on PlaNet by Weyland et. all
Ref: arxiv.org/abs/1602.05314 : PlaNet—Photo
Geolocation with Convolutional Neural Networks
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
LocationNet Model Approach
• Model trained and built with Apache MXNet
• Trained with 33.9 million geo-tagged images from the
AWS Multimedia Commons Dataset for 12 epochs over
9 days using a single p2.16xlarge.
• Uses Google’s S2 Spherical Geometry library to
subdivide the earth into 15,527 of multi-scale geographic
cells which serve as classes for the data.
• Built on ResNet-101 architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Model Architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Example S2 Multi-scale partitioning
Ref: arxiv.org/abs/1602.05314 : PlaNet—Photo Geolocation with
Convolutional Neural Networks
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Pros / Cons of this approach
• Surprisingly precise in cities
with larger numbers of
partitions
• Fast inference (<100ms on
t2.large)
• Excellent performance for
unique objects / landmarks
• Small model <300 MB can
be deployed anywhere
• Surprisingly inaccurate in
locales with fewer partitions.
• Poor performance for
common objects / terrain
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Infrastructure for WhereML
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Architecture
1. Twitter Webhook calls to API Gateway endpoint
2. API Gateway invokes Lambda function with payload
from twitter
3. Lambda function calls out to SageMaker Inference
Endpoint with URL of image
4. Inference endpoint downloads image and classifies it
with LocationNet
5. Lambda posts results back to Twitter
AWS Lambda FunctionAmazon API
Gateway
SageMaker
Inference
Endpoint
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Amazon API Gateway
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
AWS Lambda Function
• Proxy-Invocation from API Gateway sends entire request to the Lambda
• AWS Lambda Function:
1. Parses the incoming request
2. Verifies it is from Twitter and verifies message integrity
3. Parses the tweet
4. Sends the media URL in tweet to SageMaker endpoint
5. Uses twitter API to respond to original tweet
• Billed per GB/Second. 400,000 GB/S perpetual free-tier.
• Any scale of requests, but SageMaker endpoint limited to 10,000 TPS
• Python 🐍
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Lambda Function – Verify Request
1 def lambda_handler(events, context):
2 # deal with bad requests
3 if event.get('path') != WEBHOOK_PATH:
4 return {'statusCode': 404, 'body': ''}
5 # deal with subscription calls
6 if event.get('httpMethod') == 'GET':
7 crc = event.get('queryStringParameters', {}).get('crc_token')
8 if not crc: return {'statusCode': 401, 'body': 'bad crc'}
9 return {'statusCode': 200, 'body': sign_crc(crc)}
10 # deal with bad crc
11 if not verify_request(event, context):
12 return {'statusCode': 400, 'body': 'bad crc'}
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Lambda Function – Verify Request Utilities
1 def sign_crc(crc):
2 h = hmac.new(
3 bytes(CONSUMER_SECRET, 'ascii'), bytes(crc, 'ascii'),
4 digestmod=sha256)
5 return json.dumps({
6 "response_token": "sha256="+b64encode(h.digest()).decode()
7 })
8
9 def verify_request(event, context):
10 crc = event['headers']['X-Twitter-Webhooks-Signature']
11 h = hmac.new(
12 bytes(CONSUMER_SECRET, 'ascii'),
13 bytes(event['body'], 'utf-8'),
14 digestmod=sha256)
15 crc = b64decode(crc[7:]) # strip out the first 7 characters ("sha256=")
16 return hmac.compare_digest(h.digest(), crc)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Lambda Function – SageMaker and Twitter
1 def lambda_handler(events, context):
2 # we're good! load that event up
3 twitter_events = json.loads(event['body'])
4 for event in twitter_events.get('tweet_create_events', []):
5 if validate_record(event):
6 body = json.dumps({'url': media, 'max_predictions': MAX_PREDICTIONS})
7 results = json.loads(
8 sagemaker.invoke_endpoint(EndpointName=ENDPOINT_NAME, Body=body)
9 )['Body'].read()
10 status = build_tweet(results)
11 twitter_api.PostUpdate(
12 "📍 ?n" + status[0],
13 media=status[1],
14 in_reply_to_status_id=event['id_str'],
15 auto_populate_reply_metadata=True
16 )
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
SageMaker Architecture
• Docker container stored in ECR
• Autoscaling Endpoint spins up
containers as needed and
automatically fetches model artifacts
from S3 and puts them in
/opt/models
• Flask app responds to /ping and
/inference
Amazon SageMaker
Model Artifacts
Inference
Endpoint
Inference code
Amazon ECR
Inference code
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
SageMaker Inference Code – Load Model
1 import mxnet as mx
2 import numpy as np
3 sym, arg_params, aux_params = mx.model.load_checkpoint(MODEL_NAME, 12)
4 mod = mx.mod.Module(symbol=sym, context=mx.cpu())
5 mod.bind([('data', (1, 3, 224, 224))], for_training=False)
6 mod.set_params(arg_params, aux_params, allow_missing=True)
7 Batch = namedtuple('Batch', ['data'])
8 grids = load_grids()
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
SageMaker Inference Code – Predict
1 def predict(img, max_predictions):
2 mod.forward(Batch(img), is_train=False)
3 prob = mod.get_outputs()[0].asnumpy()[0]
4 pred = np.argsort(prob)[::-1]
5 result = []
6 for i in range(max_predictions):
7 pred_loc = grids[int(pred[i])]
8 result.append((pred_loc, prob[]))
9 return result
10
11 def download_and_predict(url, max_predictions=3):
12 img = preprocess_image(download_image(url))
13 return predict(img, max_predictions)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
SageMaker Inference Code – Flask App
1 from flask import request, jsonify, Flask
2 import predict
3 app = Flask("WhereML")
4
5 @app.route("/ping")
6 def ping():
7 return "", 200
8
9 @app.route("/invocations", methods=["POST"])
10 def invoke():
11 data = request.get_json(force=True)
12 return jsonify(predict.download_and_predict(data['url']))
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
SageMaker Inference Code – Docker File
1 FROM mxnet/python:latest
2 WORKDIR /app
3 RUN pip install -U flask scikit-image numpy reverse_geocoder boto3
4 COPY *.py /app/
5 COPY grids.txt /app/
6 ENTRYPOINT ["python", "app.py"]
7 EXPOSE 8080
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Working with Twitter
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Twitter API
• Two ways to respond to mentions: User Streams API
(deprecated) and Account Activity API (beta)
• Account Activity Webhooks allow fully “serverless” approach
• UserStreams API requires running container/instance to poll
for updates
• UserStreams API is going away in June 2018… even though
the replacement for it is not GA…
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Registering Webhook
1 twitter = OAuth1Session(**keys)
2 base_url = "https://api.twitter.com/1.1/all/env-beta/"
3 params={'url': "https://mywebsite.com/twitter/whereml"}
4 webhook_id = twitter.post(base_url+"webhooks.json", params).json()['id']
5 # pass webhook ID in prod, not needed in beta
6 twitter.post(base_url+"subscriptions.json")
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
SageMaker
Notebooks
Training
Algorithm
SageMaker
Training
Amazon ECR
Code Commit
Code Pipeline
SageMaker
Hosting
dataset
AWS
Lambda
API
Gateway
SageMaker Example End-to-End Architecture
Build
Train
Deploy
static website hosted on S3
Inference requests
Amazon S3
Amazon
Cloudfront
Web assets on
Cloudfront
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Easy to get started!
Tons of tools
Machine Learning is FUN
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Built live on twitch.tv/aws
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
Thank you!
randhunt@amazon.com

More Related Content

What's hot

What's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitWhat's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitAmazon Web Services
 
High Performance Computing on AWS
High Performance Computing on AWSHigh Performance Computing on AWS
High Performance Computing on AWSAmazon Web Services
 
Innovation-at-Hyper-scale-Outlook-on-Emerging-Technologies
Innovation-at-Hyper-scale-Outlook-on-Emerging-TechnologiesInnovation-at-Hyper-scale-Outlook-on-Emerging-Technologies
Innovation-at-Hyper-scale-Outlook-on-Emerging-TechnologiesAmazon Web Services
 
Build Data Driven Apps with Real-time and Offline Capabilities
Build Data Driven Apps with Real-time and Offline CapabilitiesBuild Data Driven Apps with Real-time and Offline Capabilities
Build Data Driven Apps with Real-time and Offline CapabilitiesAmazon Web Services
 
Scalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS Summit
Scalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS SummitScalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS Summit
Scalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS SummitAmazon Web Services
 
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017Amazon Web Services
 
What's new with Amazon Redshift - ADB203 - New York AWS Summit
What's new with Amazon Redshift - ADB203 - New York AWS SummitWhat's new with Amazon Redshift - ADB203 - New York AWS Summit
What's new with Amazon Redshift - ADB203 - New York AWS SummitAmazon Web Services
 
Migrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data LakeMigrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data LakeAmazon Web Services
 
High-Performance-Computing-on-AWS-and-Industry-Simulation
High-Performance-Computing-on-AWS-and-Industry-SimulationHigh-Performance-Computing-on-AWS-and-Industry-Simulation
High-Performance-Computing-on-AWS-and-Industry-SimulationAmazon Web Services
 
Work with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS Summit
Work with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS SummitWork with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS Summit
Work with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS SummitAmazon Web Services
 
Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017
Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017
Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017Amazon Web Services
 
MCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWSMCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWSAmazon Web Services
 
Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon Web Services
 
GPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
GPSTEC326-GPS Industry 4.0 AI and the Future of ManufacturingGPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
GPSTEC326-GPS Industry 4.0 AI and the Future of ManufacturingAmazon Web Services
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Amazon Web Services
 
Amazon AI/ML Overview
Amazon AI/ML OverviewAmazon AI/ML Overview
Amazon AI/ML OverviewBESPIN GLOBAL
 
Foundations of Amazon EC2 - SRV319
Foundations of Amazon EC2 - SRV319 Foundations of Amazon EC2 - SRV319
Foundations of Amazon EC2 - SRV319 Amazon Web Services
 
Simple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailSimple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailAmazon Web Services
 
AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...
AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...
AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...Amazon Web Services Korea
 
A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...
A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...
A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...Amazon Web Services
 

What's hot (20)

What's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitWhat's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS Summit
 
High Performance Computing on AWS
High Performance Computing on AWSHigh Performance Computing on AWS
High Performance Computing on AWS
 
Innovation-at-Hyper-scale-Outlook-on-Emerging-Technologies
Innovation-at-Hyper-scale-Outlook-on-Emerging-TechnologiesInnovation-at-Hyper-scale-Outlook-on-Emerging-Technologies
Innovation-at-Hyper-scale-Outlook-on-Emerging-Technologies
 
Build Data Driven Apps with Real-time and Offline Capabilities
Build Data Driven Apps with Real-time and Offline CapabilitiesBuild Data Driven Apps with Real-time and Offline Capabilities
Build Data Driven Apps with Real-time and Offline Capabilities
 
Scalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS Summit
Scalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS SummitScalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS Summit
Scalable, secure log analytics with Amazon ES - ADB302 - Chicago AWS Summit
 
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
 
What's new with Amazon Redshift - ADB203 - New York AWS Summit
What's new with Amazon Redshift - ADB203 - New York AWS SummitWhat's new with Amazon Redshift - ADB203 - New York AWS Summit
What's new with Amazon Redshift - ADB203 - New York AWS Summit
 
Migrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data LakeMigrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data Lake
 
High-Performance-Computing-on-AWS-and-Industry-Simulation
High-Performance-Computing-on-AWS-and-Industry-SimulationHigh-Performance-Computing-on-AWS-and-Industry-Simulation
High-Performance-Computing-on-AWS-and-Industry-Simulation
 
Work with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS Summit
Work with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS SummitWork with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS Summit
Work with Machine Learning in Amazon SageMaker - BDA203 - Toronto AWS Summit
 
Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017
Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017
Tooling Up for Efficiency: DIY Solutions @ Netflix - ABD319 - re:Invent 2017
 
MCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWSMCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWS
 
Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)
 
GPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
GPSTEC326-GPS Industry 4.0 AI and the Future of ManufacturingGPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
GPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
 
Amazon AI/ML Overview
Amazon AI/ML OverviewAmazon AI/ML Overview
Amazon AI/ML Overview
 
Foundations of Amazon EC2 - SRV319
Foundations of Amazon EC2 - SRV319 Foundations of Amazon EC2 - SRV319
Foundations of Amazon EC2 - SRV319
 
Simple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailSimple Cloud with Amazon Lightsail
Simple Cloud with Amazon Lightsail
 
AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...
AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...
AWS를 활용한 Digital Manufacturing 실현 방법 및 사례 소개 - Douglas Bellin, 월드와이드 제조 솔루션 담...
 
A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...
A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...
A Look Under the Hood – How Amazon.com Uses AWS Services for Analytics at Mas...
 

Similar to Where ml ai_heavy

NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...Amazon Web Services
 
Mcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbangaMcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbangaDan Romuald Mbanga
 
Supercharge your Machine Learning Solutions with Amazon SageMaker
Supercharge your Machine Learning Solutions with Amazon SageMakerSupercharge your Machine Learning Solutions with Amazon SageMaker
Supercharge your Machine Learning Solutions with Amazon SageMakerAmazon Web Services
 
Supercharge Your Machine Learning Solutions with Amazon SageMaker
Supercharge Your Machine Learning Solutions with Amazon SageMakerSupercharge Your Machine Learning Solutions with Amazon SageMaker
Supercharge Your Machine Learning Solutions with Amazon SageMakerAmazon Web Services
 
Working with Amazon SageMaker Algorithms for Faster Model Training
Working with Amazon SageMaker Algorithms for Faster Model TrainingWorking with Amazon SageMaker Algorithms for Faster Model Training
Working with Amazon SageMaker Algorithms for Faster Model TrainingAmazon Web Services
 
End to End Model Development to Deployment using SageMaker
End to End Model Development to Deployment using SageMakerEnd to End Model Development to Deployment using SageMaker
End to End Model Development to Deployment using SageMakerAmazon Web Services
 
AWS Machine Learning Week SF: End to End Model Development Using SageMaker
AWS Machine Learning Week SF: End to End Model Development Using SageMakerAWS Machine Learning Week SF: End to End Model Development Using SageMaker
AWS Machine Learning Week SF: End to End Model Development Using SageMakerAmazon Web Services
 
Amazon SageMaker workshop
Amazon SageMaker workshopAmazon SageMaker workshop
Amazon SageMaker workshopJulien SIMON
 
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018Amazon Web Services
 
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)Julien SIMON
 
Integrating Deep Learning Into Your Enterprise
Integrating Deep Learning Into Your EnterpriseIntegrating Deep Learning Into Your Enterprise
Integrating Deep Learning Into Your EnterpriseAmazon Web Services
 
Integrating Deep Learning In the Enterprise
Integrating Deep Learning In the EnterpriseIntegrating Deep Learning In the Enterprise
Integrating Deep Learning In the EnterpriseAmazon Web Services
 
Integrating Deep Learning into your Enterprise
Integrating Deep Learning into your EnterpriseIntegrating Deep Learning into your Enterprise
Integrating Deep Learning into your EnterpriseAmazon Web Services
 
Machine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerMachine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerAmazon Web Services
 
Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...
Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...
Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...Amazon Web Services
 
Integrating Amazon SageMaker into your Enterprise - AWS Online Tech Talks
Integrating Amazon SageMaker into your Enterprise - AWS Online Tech TalksIntegrating Amazon SageMaker into your Enterprise - AWS Online Tech Talks
Integrating Amazon SageMaker into your Enterprise - AWS Online Tech TalksAmazon Web Services
 
Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018
Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018
Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018Amazon Web Services
 
Machine Learning - From Notebook to Production with Amazon Sagemaker
Machine Learning - From Notebook to Production with Amazon SagemakerMachine Learning - From Notebook to Production with Amazon Sagemaker
Machine Learning - From Notebook to Production with Amazon SagemakerAmazon Web Services
 
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...Julien SIMON
 
Build Your Recommendation Engine on AWS Today!
Build Your Recommendation Engine on AWS Today!Build Your Recommendation Engine on AWS Today!
Build Your Recommendation Engine on AWS Today!AWS Germany
 

Similar to Where ml ai_heavy (20)

NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
 
Mcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbangaMcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbanga
 
Supercharge your Machine Learning Solutions with Amazon SageMaker
Supercharge your Machine Learning Solutions with Amazon SageMakerSupercharge your Machine Learning Solutions with Amazon SageMaker
Supercharge your Machine Learning Solutions with Amazon SageMaker
 
Supercharge Your Machine Learning Solutions with Amazon SageMaker
Supercharge Your Machine Learning Solutions with Amazon SageMakerSupercharge Your Machine Learning Solutions with Amazon SageMaker
Supercharge Your Machine Learning Solutions with Amazon SageMaker
 
Working with Amazon SageMaker Algorithms for Faster Model Training
Working with Amazon SageMaker Algorithms for Faster Model TrainingWorking with Amazon SageMaker Algorithms for Faster Model Training
Working with Amazon SageMaker Algorithms for Faster Model Training
 
End to End Model Development to Deployment using SageMaker
End to End Model Development to Deployment using SageMakerEnd to End Model Development to Deployment using SageMaker
End to End Model Development to Deployment using SageMaker
 
AWS Machine Learning Week SF: End to End Model Development Using SageMaker
AWS Machine Learning Week SF: End to End Model Development Using SageMakerAWS Machine Learning Week SF: End to End Model Development Using SageMaker
AWS Machine Learning Week SF: End to End Model Development Using SageMaker
 
Amazon SageMaker workshop
Amazon SageMaker workshopAmazon SageMaker workshop
Amazon SageMaker workshop
 
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
 
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
 
Integrating Deep Learning Into Your Enterprise
Integrating Deep Learning Into Your EnterpriseIntegrating Deep Learning Into Your Enterprise
Integrating Deep Learning Into Your Enterprise
 
Integrating Deep Learning In the Enterprise
Integrating Deep Learning In the EnterpriseIntegrating Deep Learning In the Enterprise
Integrating Deep Learning In the Enterprise
 
Integrating Deep Learning into your Enterprise
Integrating Deep Learning into your EnterpriseIntegrating Deep Learning into your Enterprise
Integrating Deep Learning into your Enterprise
 
Machine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerMachine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon Sagemaker
 
Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...
Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...
Perform Machine Learning at the IoT Edge using AWS Greengrass and Amazon Sage...
 
Integrating Amazon SageMaker into your Enterprise - AWS Online Tech Talks
Integrating Amazon SageMaker into your Enterprise - AWS Online Tech TalksIntegrating Amazon SageMaker into your Enterprise - AWS Online Tech Talks
Integrating Amazon SageMaker into your Enterprise - AWS Online Tech Talks
 
Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018
Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018
Predicting the Future with Amazon SageMaker - AWS Summit Sydney 2018
 
Machine Learning - From Notebook to Production with Amazon Sagemaker
Machine Learning - From Notebook to Production with Amazon SagemakerMachine Learning - From Notebook to Production with Amazon Sagemaker
Machine Learning - From Notebook to Production with Amazon Sagemaker
 
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
 
Build Your Recommendation Engine on AWS Today!
Build Your Recommendation Engine on AWS Today!Build Your Recommendation Engine on AWS Today!
Build Your Recommendation Engine on AWS Today!
 

More from Randall Hunt

Canada DevOps Conference
Canada DevOps ConferenceCanada DevOps Conference
Canada DevOps ConferenceRandall Hunt
 
TIAD - Is Automation Worth My Time?
TIAD - Is Automation Worth My Time?TIAD - Is Automation Worth My Time?
TIAD - Is Automation Worth My Time?Randall Hunt
 
A Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.ioA Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.ioRandall Hunt
 
MongoDB at LAHacks :)
MongoDB at LAHacks :)MongoDB at LAHacks :)
MongoDB at LAHacks :)Randall Hunt
 
Schema Design in MongoDB - TriMug Meetup North Carolina
Schema Design in MongoDB - TriMug Meetup North CarolinaSchema Design in MongoDB - TriMug Meetup North Carolina
Schema Design in MongoDB - TriMug Meetup North CarolinaRandall Hunt
 
Replication MongoDB Days 2013
Replication MongoDB Days 2013Replication MongoDB Days 2013
Replication MongoDB Days 2013Randall Hunt
 
Sharding in MongoDB Days 2013
Sharding in MongoDB Days 2013Sharding in MongoDB Days 2013
Sharding in MongoDB Days 2013Randall Hunt
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica setsRandall Hunt
 

More from Randall Hunt (9)

Canada DevOps Conference
Canada DevOps ConferenceCanada DevOps Conference
Canada DevOps Conference
 
TIAD - Is Automation Worth My Time?
TIAD - Is Automation Worth My Time?TIAD - Is Automation Worth My Time?
TIAD - Is Automation Worth My Time?
 
Git
GitGit
Git
 
A Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.ioA Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.io
 
MongoDB at LAHacks :)
MongoDB at LAHacks :)MongoDB at LAHacks :)
MongoDB at LAHacks :)
 
Schema Design in MongoDB - TriMug Meetup North Carolina
Schema Design in MongoDB - TriMug Meetup North CarolinaSchema Design in MongoDB - TriMug Meetup North Carolina
Schema Design in MongoDB - TriMug Meetup North Carolina
 
Replication MongoDB Days 2013
Replication MongoDB Days 2013Replication MongoDB Days 2013
Replication MongoDB Days 2013
 
Sharding in MongoDB Days 2013
Sharding in MongoDB Days 2013Sharding in MongoDB Days 2013
Sharding in MongoDB Days 2013
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Where ml ai_heavy

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Randall Hunt – Some Guy From Los Angeles @WhereML a Serverless AI Powered Location Guessing Twitter Bot Built with Amazon SageMaker and AWS Lambda Based on LocationNet work by Jaeyoung Choi and Kevin Li
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt About Me • Technical Evangelist at AWS • I build some demos: https://github.com/ranman • I write some blogs: https://aws.amazon.com/blogs/aws/author/randhunt/ • Formerly of SpaceX, NASA, MongoDB • I like Python • I dislike javascript • I look ridiculous in my badge photo
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Example Try it! Tweet to @WhereML with a picture. Hold your cell phone camera to the screen
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Architecture AWS Lambda FunctionAmazon API Gateway Amazon SageMaker Model Artifacts Inference Endpoint Inference code Amazon ECR Inference code
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Solving Some Of The Hardest Problems In Computer Science Learning Language Perception Problem Solving Reasoning
  • 6. The (60 year) rise of Artificial Intelligence
  • 7.
  • 8.
  • 9.
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Put machine learning in the hands of every developer and data scientist ML @ AWS: Our mission
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer Running ML on AWS Today
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Reviewing The ML Process
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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 YesNo DataAugmentation Feature Augmentation The Machine Learning Process Re-training
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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 YesNo DataAugmentation Feature Augmentation Discovery: The Analysts Re-training • Help formulate the right questions • Domain Knowledge
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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 YesNo DataAugmentation Feature Augmentation Integration: The Data Architecture Retraining • Build the data platform: • Amazon S3 • AWS Glue • Amazon Athena • Amazon EMR • Amazon Redshift Spectrum
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Visualization & Analysis Feature Engineering Model Training & Parameter Tuning Model Evaluation • 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 Why We built Amazon SageMaker: The Model Training Undifferentiated Heavy Lifting
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Business Problem – Model Deployment Monitoring & Debugging – Predictions • Setup and manage Model Inference Clusters • Manage and Scale Model Inference APIs • Monitor and Debug Model Predictions • Models versioning and performance tracking • Automate New Model version promotion to production (A/B testing) Why We built Amazon SageMaker: The Model Deployment Undifferentiated Heavy Lifting
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A fully managed service that enables data scientists and developers to quickly and easily build machine-learning based models into production smart applications. Amazon SageMaker
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker 1 2 3 4 I I I I Notebook Instances Algorithms ML Training Service ML Hosting Service
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1 I Notebook Instances Zero Setup For Exploratory Data Analysis Authoring & Notebooks 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 • More… “Just add data”
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Streaming datasets, for cheaper training Train faster, in a single pass Greater reliability on extremely large datasets Choice of several ML algorithms Amazon SageMaker: 10x better algorithms 2 I Algorithms
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cost vs. Time $$$$ $$$ $$ $ Minutes Hours Days Weeks Months Single Machine Distributed, with Strong Machines
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infinitely Scalable ML Algorithms
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2 I Algorithms 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) IM Estimators in Apache Spark Bring Your Own Algorithm (You build the Container) Amazon SageMaker: 10x better algorithms
  • 28. © 2017, 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 ML Training Service Fetch Training data Save Model Artifacts Fully managed – Secured– Amazon ECR Save Inference Image IM Estimators in Apache Spark CPU GPU HPO
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR Amazon SageMaker Easy Model Deployment to Amazon SageMaker Versions of the same inference code saved in inference containers. Prod is the primary one, 50% of the traffic must be served there!
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR Model Artifacts Inference Image Versions of the same inference code saved in inference containers. Prod is the primary one, 50% of the traffic must be served there! Create a Model ModelName: prod Amazon SageMaker Easy Model Deployment to Amazon SageMaker
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR 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! Create versions of a Model Amazon SageMaker Easy Model Deployment to Amazon SageMaker
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR 30 50 10 10 InstanceType: c3.4xlarge InitialInstanceCount: 3 ModelName: prod VariantName: primary InitialVariantWeight: 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! Create weighted ProductionVariants Amazon SageMaker Easy Model Deployment to Amazon SageMaker
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR 30 50 10 10 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! Create an EndpointConfiguration from one or many ProductionVariant(s)EndpointConfiguration Amazon SageMaker Easy Model Deployment to Amazon SageMaker InstanceType: c3.4xlarge InitialInstanceCount: 3 ModelName: prod VariantName: primary InitialVariantWeight: 50
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR 30 50 10 10 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! Create an Endpoint from one EndpointConfiguration EndpointConfiguration Inference Endpoint Amazon SageMaker Easy Model Deployment to Amazon SageMaker InstanceType: c3.4xlarge InitialInstanceCount: 3 ModelName: prod VariantName: primary InitialVariantWeight: 50
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service Amazon ECR 30 50 10 10 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 Amazon SageMaker Easy Model Deployment to Amazon SageMaker InstanceType: c3.4xlarge InitialInstanceCount: 3 ModelName: prod VariantName: primary InitialVariantWeight: 50
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 I ML Hosting Service  Auto-Scaling Inference APIs  A/B Testing (more to come)  Low Latency & High Throughput  Bring Your Own Model  Python SDK Amazon SageMaker Easy Model Deployment to Amazon SageMaker
  • 37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building the Model
  • 38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Credits • This model, LocationNet, was built by Jaeyoung Choi of the International Computer Science Institute and Kevin Li of the University of California, Berkley • Supported by the AWS Cloud Credits for Research Program • Based on work on PlaNet by Weyland et. all Ref: arxiv.org/abs/1602.05314 : PlaNet—Photo Geolocation with Convolutional Neural Networks
  • 39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt LocationNet Model Approach • Model trained and built with Apache MXNet • Trained with 33.9 million geo-tagged images from the AWS Multimedia Commons Dataset for 12 epochs over 9 days using a single p2.16xlarge. • Uses Google’s S2 Spherical Geometry library to subdivide the earth into 15,527 of multi-scale geographic cells which serve as classes for the data. • Built on ResNet-101 architecture
  • 40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Model Architecture
  • 41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Example S2 Multi-scale partitioning Ref: arxiv.org/abs/1602.05314 : PlaNet—Photo Geolocation with Convolutional Neural Networks
  • 42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt
  • 43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Pros / Cons of this approach • Surprisingly precise in cities with larger numbers of partitions • Fast inference (<100ms on t2.large) • Excellent performance for unique objects / landmarks • Small model <300 MB can be deployed anywhere • Surprisingly inaccurate in locales with fewer partitions. • Poor performance for common objects / terrain
  • 44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Infrastructure for WhereML
  • 45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Architecture 1. Twitter Webhook calls to API Gateway endpoint 2. API Gateway invokes Lambda function with payload from twitter 3. Lambda function calls out to SageMaker Inference Endpoint with URL of image 4. Inference endpoint downloads image and classifies it with LocationNet 5. Lambda posts results back to Twitter AWS Lambda FunctionAmazon API Gateway SageMaker Inference Endpoint
  • 46. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Amazon API Gateway
  • 47. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt AWS Lambda Function • Proxy-Invocation from API Gateway sends entire request to the Lambda • AWS Lambda Function: 1. Parses the incoming request 2. Verifies it is from Twitter and verifies message integrity 3. Parses the tweet 4. Sends the media URL in tweet to SageMaker endpoint 5. Uses twitter API to respond to original tweet • Billed per GB/Second. 400,000 GB/S perpetual free-tier. • Any scale of requests, but SageMaker endpoint limited to 10,000 TPS • Python 🐍
  • 48. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Lambda Function – Verify Request 1 def lambda_handler(events, context): 2 # deal with bad requests 3 if event.get('path') != WEBHOOK_PATH: 4 return {'statusCode': 404, 'body': ''} 5 # deal with subscription calls 6 if event.get('httpMethod') == 'GET': 7 crc = event.get('queryStringParameters', {}).get('crc_token') 8 if not crc: return {'statusCode': 401, 'body': 'bad crc'} 9 return {'statusCode': 200, 'body': sign_crc(crc)} 10 # deal with bad crc 11 if not verify_request(event, context): 12 return {'statusCode': 400, 'body': 'bad crc'}
  • 49. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Lambda Function – Verify Request Utilities 1 def sign_crc(crc): 2 h = hmac.new( 3 bytes(CONSUMER_SECRET, 'ascii'), bytes(crc, 'ascii'), 4 digestmod=sha256) 5 return json.dumps({ 6 "response_token": "sha256="+b64encode(h.digest()).decode() 7 }) 8 9 def verify_request(event, context): 10 crc = event['headers']['X-Twitter-Webhooks-Signature'] 11 h = hmac.new( 12 bytes(CONSUMER_SECRET, 'ascii'), 13 bytes(event['body'], 'utf-8'), 14 digestmod=sha256) 15 crc = b64decode(crc[7:]) # strip out the first 7 characters ("sha256=") 16 return hmac.compare_digest(h.digest(), crc)
  • 50. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Lambda Function – SageMaker and Twitter 1 def lambda_handler(events, context): 2 # we're good! load that event up 3 twitter_events = json.loads(event['body']) 4 for event in twitter_events.get('tweet_create_events', []): 5 if validate_record(event): 6 body = json.dumps({'url': media, 'max_predictions': MAX_PREDICTIONS}) 7 results = json.loads( 8 sagemaker.invoke_endpoint(EndpointName=ENDPOINT_NAME, Body=body) 9 )['Body'].read() 10 status = build_tweet(results) 11 twitter_api.PostUpdate( 12 "📍 ?n" + status[0], 13 media=status[1], 14 in_reply_to_status_id=event['id_str'], 15 auto_populate_reply_metadata=True 16 )
  • 51. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt SageMaker Architecture • Docker container stored in ECR • Autoscaling Endpoint spins up containers as needed and automatically fetches model artifacts from S3 and puts them in /opt/models • Flask app responds to /ping and /inference Amazon SageMaker Model Artifacts Inference Endpoint Inference code Amazon ECR Inference code
  • 52. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt SageMaker Inference Code – Load Model 1 import mxnet as mx 2 import numpy as np 3 sym, arg_params, aux_params = mx.model.load_checkpoint(MODEL_NAME, 12) 4 mod = mx.mod.Module(symbol=sym, context=mx.cpu()) 5 mod.bind([('data', (1, 3, 224, 224))], for_training=False) 6 mod.set_params(arg_params, aux_params, allow_missing=True) 7 Batch = namedtuple('Batch', ['data']) 8 grids = load_grids()
  • 53. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt SageMaker Inference Code – Predict 1 def predict(img, max_predictions): 2 mod.forward(Batch(img), is_train=False) 3 prob = mod.get_outputs()[0].asnumpy()[0] 4 pred = np.argsort(prob)[::-1] 5 result = [] 6 for i in range(max_predictions): 7 pred_loc = grids[int(pred[i])] 8 result.append((pred_loc, prob[])) 9 return result 10 11 def download_and_predict(url, max_predictions=3): 12 img = preprocess_image(download_image(url)) 13 return predict(img, max_predictions)
  • 54. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt SageMaker Inference Code – Flask App 1 from flask import request, jsonify, Flask 2 import predict 3 app = Flask("WhereML") 4 5 @app.route("/ping") 6 def ping(): 7 return "", 200 8 9 @app.route("/invocations", methods=["POST"]) 10 def invoke(): 11 data = request.get_json(force=True) 12 return jsonify(predict.download_and_predict(data['url']))
  • 55. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt SageMaker Inference Code – Docker File 1 FROM mxnet/python:latest 2 WORKDIR /app 3 RUN pip install -U flask scikit-image numpy reverse_geocoder boto3 4 COPY *.py /app/ 5 COPY grids.txt /app/ 6 ENTRYPOINT ["python", "app.py"] 7 EXPOSE 8080
  • 56. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Working with Twitter
  • 57. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Twitter API • Two ways to respond to mentions: User Streams API (deprecated) and Account Activity API (beta) • Account Activity Webhooks allow fully “serverless” approach • UserStreams API requires running container/instance to poll for updates • UserStreams API is going away in June 2018… even though the replacement for it is not GA…
  • 58. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Registering Webhook 1 twitter = OAuth1Session(**keys) 2 base_url = "https://api.twitter.com/1.1/all/env-beta/" 3 params={'url': "https://mywebsite.com/twitter/whereml"} 4 webhook_id = twitter.post(base_url+"webhooks.json", params).json()['id'] 5 # pass webhook ID in prod, not needed in beta 6 twitter.post(base_url+"subscriptions.json")
  • 59. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt SageMaker Notebooks Training Algorithm SageMaker Training Amazon ECR Code Commit Code Pipeline SageMaker Hosting dataset AWS Lambda API Gateway SageMaker Example End-to-End Architecture Build Train Deploy static website hosted on S3 Inference requests Amazon S3 Amazon Cloudfront Web assets on Cloudfront
  • 60. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Easy to get started! Tons of tools Machine Learning is FUN
  • 61. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Built live on twitch.tv/aws
  • 62. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @jrhunt Thank you! randhunt@amazon.com

Editor's Notes

  1. When did it all start? Well, that was approx 60 years ago! In 1957, Frank Rosenblatt - an electro-mechanical neural network, the Perceptron, which he trained to recognize images (20x20 “pixels”). In 1975, Paul Werbos published a article describing “backpropagation”, an algorithm allowing better and faster training of neural networks. So, if neural networks have been around for so long, whats wrong with them?  Why do we talk about them today?
  2. Amazon Robotics was founded in 2003 on the notion that in order to meet consumer demands in eCommerce, a better approach to order fulfillment solutions was necessary. Amazon Robotics empowers a smarter, faster, more consistent customer experience through automation automates fulfilment center operations using various methods of robotic technology including autonomous mobile robots, sophisticated control software, language perception, power management, computer vision, depth sensing, machine learning, object recognition, and semantic understanding of commands.
  3. Amazon Prime Air is a service that will deliver packages up to five pounds in 30 minutes or less using small drones and relies extensively on visual object recognition. We have Prime Air development centers in the United States, the United Kingdom, Austria, France and Israel.
  4. Amazon Go is a new kind of store with no checkout required. We created the world’s most advanced shopping technology so you never have to wait in line. With our Just Walk Out Shopping experience, simply use the Amazon Go app to enter the store, take the products you want, and go! No lines, no checkout. (No, seriously.) No lines, no checkout Our checkout-free shopping experience is made possible by the same types of technologies used in self-driving cars: computer vision, sensor fusion, and deep learning. Our Just Walk Out Technology automatically detects when products are taken from or returned to the shelves and keeps track of them in a virtual cart. When you’re done shopping, you can just leave the store. Shortly after, we’ll charge your Amazon account and send you a receipt.
  5. We’re excited to have a broad set of customers running ML on AWS today. [ADD: Conde Nas – using P2 and TF to detect hand bags https://technology.condenast.com/story/handbag-brand-and-color-detection]
  6. The Data platform
  7. Highly-optimized Machine Learning Algorithms Amazon SageMaker installs high-performance, scalable machine learning algorithms optimized for speed, scale, and accuracy, to run on petabytes of training datasets. Based on the type of learning that you are undertaking, you can choose from supervised algorithms, such as linear/logistic regression or classification; as well as unsupervised learning, such as with k-means clustering. Linear Classification and Regression Factorization Machines K-Means Clustering Principal Components Analysis (PCA) Latent Dirichlet Analysis (Spectral LDA) Neural Topic Modeling Seqence2Sequence Gradient Boosted Trees (XGBoost)
  8. An Amazon Resource (has an ARN) Links the model artifacts (weights) to the inference container (predictions code) A model can link multiple inference containers and associated model artifacts A model is used to create a ProductionVariant One or many ProductionVariants constitute an EndpointConfiguration An Endpoint Configuration is used to create an Endpoint
  9. Each version has its inference container on ECR and model artifacts on S3 Versions of a model can be used to create multiple ProductionVariants with different weights The ProductionVariants can be used to create an EndpointConfiguration for the versions of the model The EndpointConfiguration defines the Endpoint
  10. A ProductionVariant is analogous to an Auto-Scaling Group for a specific IM model. The associated VariantWeight determines the portion of traffic handled by the ProductionVariant.
  11. The Endpoint serves the inference traffic with one or multiple auto-scaling groups (production variants) of models versions. Prod gets 50% of the traffic because its weight contributes 50% of the sum of all VariantWeights in the EndpointConfiguration
  12. Cells are hierarchical decomposition of the sphere Compact, represented by 64 bit int Similar levels represent similar sizes of area Containment query for arbitrary regions are really fast Projects points/regions of the sphere into a cube and takes each cube face as a quad-tree where the sphere point is projected into it. After that space is discretized and cells are enumerated on a Hilbert curve. Hilbert curve is a space-filling curve that converts multiple dimensions into one dimension while preserving locality
  13. Invoke takes two invocation types: Event, RequestResponse, DryRun (to just verify that you have permissions
  14. We can put this in a cloudformation custom resource