SlideShare a Scribd company logo
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Optimizing Your Machine Learning Models on
Amazon SageMaker
A I M 3 6 1 R
Julien Simon
AI/ML Evangelist
AWS
Dr Steve Turner
Head of Emerging Technologies,
UKIR
AWS
Agenda
1. Welcome & housekeeping
2. An introduction to Automatic Model Tuning (AMT) and AutoML
3. Labs
4. Wrap-up and clean-up
What you’ll learn today
• How to use AMT to find optimal model hyperparameters
• How to use AMT to explore deep learning architectures
• How to use Amazon SageMaker Autopilot to find the optimal algorithm, data preprocessing steps and hyper
parameters
Our team today
• Antje
• Chris
• Srikanth
• Wei
• Marc
• Michael E
• Matt
• Mike
• Guillaume
• Michael M
• Frank
• Shashank
• John
• Abhi
• Navjot
• Bo
• Boaz
• Mohamed
Housekeeping
• Please be a good neighbor ☺
• Turn off network backups and any network-hogging app
• Switch your phones to silent mode
• Help the people around you if you can
• Don’t stay blocked. Ask questions!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hyperparameters
Neural Networks
Number of layers
Hidden layer width
Learning rate
Embedding
dimensions
Dropout
…
XGBoost
Tree depth
Max leaf nodes
Gamma
Eta
Lambda
Alpha
…
Tactics to find the optimal set of hyperparameters
• Manual Search: ”I know what I’m doing”
• Grid Search: “X marks the spot”
Typically training hundreds of models
Slow and expensive
• Random Search: “Spray and pray”
« Random Search for Hyper-Parameter Optimization », Bergstra & Bengio, 2012
Works better and faster than Grid Search
But… but… but… it’s random!
• Hyperparameter Optimization: use ML to predict hyperparameters
Training fewer models
Gaussian Process Regression and Bayesian Optimization
https://docs.aws.amazon.com/en_pv/sagemaker/latest/dg/automatic-model-tuning-how-it-works.html
Setting hyperparameters in Amazon SageMaker
• Built-in algorithms
• Python parameters for the relevant estimator (KMeans, LinearLearner, etc.)
• Built-in frameworks
• hyperparameters parameter for the relevant estimator (TensorFlow, MXNet, etc.)
• This must be a Python dictionary
tf_estimator = TensorFlow(…, hyperparameters={'epochs’: 1, ‘lr’: ‘0.01’})
• Your code must be able to accept them as command-line arguments (script mode)
• Bring your own container
• hyperparameters parameter for Estimator
• This must be Python dictionary
• It’s copied inside the container: /opt/ml/input/config/hyperparameters.json
Automatic Model Tuning in Amazon SageMaker
1. Define an Estimator the normal way
2. Define the metric to tune on
• Pre-defined metrics for built-in algorithms and frameworks
• Or anything present in the training log, provided that you pass a regular expression for it
3. Define parameter ranges to explore
• Type: categorical (avoid if possible), integer, continuous (aka floating point)
• Range
• Scaling: linear (default), logarithmic, reverse logarithmic
4. Create an HyperparameterTuner
• Estimator, metric, parameters, total number of jobs, number of jobs in parallel
• Strategy: bayesian (default), or random search
5. Launch the tuning job with fit()
Workflow
Training JobHyperparameter
Tuning Job
Tuning strategy
Objective
metrics
Training Job
Training Job
Training Job
Clients
(console, notebook, IDEs, CLI)
model name
model1
model2
…
objective
metric
0.8
0.75
…
eta
0.07
0.09
…
max_depth
6
5
…
…
Automatic Model Tuning in Amazon SageMaker
• You can view ongoing tuning jobs in the AWS console
• List of training jobs
• Best training job
• You can also query their status with the SageMaker SDK
• Calling deploy() on the HyperparameterTuner deploys the best job
• The best job so far if the tuning job has not yet completed
Tips
• Use the bayesian strategy for better, faster, cheaper results
• Most customers use random search as a baseline, to check that bayesian performs better
• Don’t run too many jobs in parallel
• This gives the bayesian strategy fewer opportunities to predict
• Instance limits!
• Don’t run too many jobs
• Bayesian typically requires 10x fewer jobs than random
• Cost!
Resources on Automatic Model Tuning
Documentation
https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning.html
https://sagemaker.readthedocs.io/en/stable/tuner.html
Notebooks
https://github.com/awslabs/amazon-sagemaker-examples/tree/master/hyperparameter_tuning
Blog posts
https://aws.amazon.com/blogs/aws/sagemaker-automatic-model-tuning/
https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-produces-better-models-faster/
https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-now-supports-early-stopping-of-
training-jobs/
https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-becomes-more-efficient-with-warm-
start-of-hyperparameter-tuning-jobs/
https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-now-supports-random-search-and-
hyperparameter-scaling/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AutoML
• AutoML aims at automating the process of building a model
• Problem identification: looking at the data set, what class of problem are we trying to solve?
• Algorithm selection: which algorithm is best suited to solve the problem?
• Data preprocessing: how should data be prepared for best results?
• Hyperparameter tuning: what is the optimal set of training parameters?
• Black box vs. white box
• Black box: the best model only
→ Hard to understand the model, impossible to reproduce it manually
• White box: the best model, other candidates, full source code for preprocessing and training
→ See how the model was built, and keep tweaking for extra performance
AutoML with Amazon SageMaker Autopilot
• SageMaker Autopilot covers all steps
• Problem identification: looking at the data set, what class of problem are we trying to solve?
• Algorithm selection: which algorithm is best suited to solve the problem?
• Data preprocessing: how should data be prepared for best results?
• Hyperparameter tuning: what is the optimal set of training parameters?
• Autopilot is white box AutoML
• You can understand how the model was built, and you can keep tweaking
• Supported algorithms at launch:
Linear Learner, Factorization Machines, KNN, XGBoost
AutoML with Amazon SageMaker Autopilot
1. Upload the unprocessed dataset to S3
2. Configure the AutoML job
• Location of dataset
• Completion criteria
3. Launch the job
4. View the list of candidates and the autogenerated notebook
5. Deploy the best candidate to a real-time endpoint, or use batch
transform
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Labs
1. Use AMT to find optimal model hyperparameters for XGBoost
2. Use Autopilot to find the optimal algo, preprocessing steps and
hyper parameters
3. Use AMT to explore deep learning architectures on Keras
https://gitlab.com/juliensimon/aim361
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
Julien SIMON
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
Julien SIMON
 
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
Amazon Web Services
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)
Julien SIMON
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
Julien SIMON
 
Optimize your machine learning workloads on AWS (March 2019)
Optimize your machine learning workloads on AWS (March 2019)Optimize your machine learning workloads on AWS (March 2019)
Optimize your machine learning workloads on AWS (March 2019)
Julien SIMON
 
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Julien SIMON
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
Julien SIMON
 
Speed up your Machine Learning workflows with build-in algorithms
Speed up your Machine Learning workflows with build-in algorithmsSpeed up your Machine Learning workflows with build-in algorithms
Speed up your Machine Learning workflows with build-in algorithms
Julien SIMON
 
Machine Learning as a Service with Amazon Machine Learning
Machine Learning as a Service with Amazon Machine LearningMachine Learning as a Service with Amazon Machine Learning
Machine Learning as a Service with Amazon Machine Learning
Julien SIMON
 
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
 
Using Amazon SageMaker to build, train, & deploy your ML Models
Using Amazon SageMaker to build, train, & deploy your ML ModelsUsing Amazon SageMaker to build, train, & deploy your ML Models
Using Amazon SageMaker to build, train, & deploy your ML Models
Amazon Web Services
 
Build, train, and deploy ML models at scale.pdf
Build, train, and deploy ML models at scale.pdfBuild, train, and deploy ML models at scale.pdf
Build, train, and deploy ML models at scale.pdf
Amazon Web Services
 
Accelerate your Machine Learning workflows with Amazon SageMaker
Accelerate your Machine Learning workflows with Amazon SageMakerAccelerate your Machine Learning workflows with Amazon SageMaker
Accelerate your Machine Learning workflows with Amazon SageMaker
Julien SIMON
 
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
Amazon 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
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
Julien SIMON
 
Using Amazon SageMaker to Build, Train, and Deploy Your ML Models
Using Amazon SageMaker to Build, Train, and Deploy Your ML ModelsUsing Amazon SageMaker to Build, Train, and Deploy Your ML Models
Using Amazon SageMaker to Build, Train, and Deploy Your ML Models
Amazon Web Services
 
Using Amazon SageMaker to build, train, and deploy your ML Models
Using Amazon SageMaker to build, train, and deploy your ML ModelsUsing Amazon SageMaker to build, train, and deploy your ML Models
Using Amazon SageMaker to build, train, and deploy your ML Models
Amazon Web Services
 
Build Deep Learning Applications with TensorFlow & SageMaker
Build Deep Learning Applications with TensorFlow & SageMakerBuild Deep Learning Applications with TensorFlow & SageMaker
Build Deep Learning Applications with TensorFlow & SageMaker
Amazon Web Services
 

What's hot (20)

Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
 
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
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
 
Optimize your machine learning workloads on AWS (March 2019)
Optimize your machine learning workloads on AWS (March 2019)Optimize your machine learning workloads on AWS (March 2019)
Optimize your machine learning workloads on AWS (March 2019)
 
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
 
Speed up your Machine Learning workflows with build-in algorithms
Speed up your Machine Learning workflows with build-in algorithmsSpeed up your Machine Learning workflows with build-in algorithms
Speed up your Machine Learning workflows with build-in algorithms
 
Machine Learning as a Service with Amazon Machine Learning
Machine Learning as a Service with Amazon Machine LearningMachine Learning as a Service with Amazon Machine Learning
Machine Learning as a Service with Amazon Machine Learning
 
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 ...
 
Using Amazon SageMaker to build, train, & deploy your ML Models
Using Amazon SageMaker to build, train, & deploy your ML ModelsUsing Amazon SageMaker to build, train, & deploy your ML Models
Using Amazon SageMaker to build, train, & deploy your ML Models
 
Build, train, and deploy ML models at scale.pdf
Build, train, and deploy ML models at scale.pdfBuild, train, and deploy ML models at scale.pdf
Build, train, and deploy ML models at scale.pdf
 
Accelerate your Machine Learning workflows with Amazon SageMaker
Accelerate your Machine Learning workflows with Amazon SageMakerAccelerate your Machine Learning workflows with Amazon SageMaker
Accelerate your Machine Learning workflows 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
 
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)
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
 
Using Amazon SageMaker to Build, Train, and Deploy Your ML Models
Using Amazon SageMaker to Build, Train, and Deploy Your ML ModelsUsing Amazon SageMaker to Build, Train, and Deploy Your ML Models
Using Amazon SageMaker to Build, Train, and Deploy Your ML Models
 
Using Amazon SageMaker to build, train, and deploy your ML Models
Using Amazon SageMaker to build, train, and deploy your ML ModelsUsing Amazon SageMaker to build, train, and deploy your ML Models
Using Amazon SageMaker to build, train, and deploy your ML Models
 
Build Deep Learning Applications with TensorFlow & SageMaker
Build Deep Learning Applications with TensorFlow & SageMakerBuild Deep Learning Applications with TensorFlow & SageMaker
Build Deep Learning Applications with TensorFlow & SageMaker
 

Similar to AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)

Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker AutopilotCostruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Amazon Web Services
 
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Amazon Web Services
 
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker WorkshopAWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
Julien SIMON
 
Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)
Julien SIMON
 
Advanced Machine Learning with Amazon SageMaker
Advanced Machine Learning with Amazon SageMakerAdvanced Machine Learning with Amazon SageMaker
Advanced Machine Learning with Amazon SageMaker
Julien SIMON
 
Demystifying Machine Learning with AWS (ACD Mumbai)
Demystifying Machine Learning with AWS (ACD Mumbai)Demystifying Machine Learning with AWS (ACD Mumbai)
Demystifying Machine Learning with AWS (ACD Mumbai)
AWS User Group Pune
 
Building, Training and Deploying Custom Algorithms with Amazon SageMaker
Building, Training and Deploying Custom Algorithms with Amazon SageMakerBuilding, Training and Deploying Custom Algorithms with Amazon SageMaker
Building, Training and Deploying Custom Algorithms with Amazon SageMaker
Amazon Web Services
 
Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)
AWS User Group Pune
 
End-to-End Machine Learning with Amazon SageMaker
End-to-End Machine Learning with Amazon SageMakerEnd-to-End Machine Learning with Amazon SageMaker
End-to-End Machine Learning with Amazon SageMaker
Sungmin Kim
 
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Amazon Web Services
 
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
AWS Summits
 
From Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMakerFrom Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMaker
Amazon Web Services
 
ACDKOCHI19 - Demystifying amazon sagemaker
ACDKOCHI19 - Demystifying amazon sagemakerACDKOCHI19 - Demystifying amazon sagemaker
ACDKOCHI19 - Demystifying amazon sagemaker
AWS User Group Kochi
 
Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018
Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018
Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018
Amazon Web Services
 
Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...
Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...
Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...
Amazon Web Services
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Amazon Web Services
 
Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...
Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...
Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...
Amazon Web Services
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
Julien SIMON
 
Building machine learning inference pipelines at scale (March 2019)
Building machine learning inference pipelines at scale (March 2019)Building machine learning inference pipelines at scale (March 2019)
Building machine learning inference pipelines at scale (March 2019)
Julien SIMON
 
Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)
Julien SIMON
 

Similar to AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019) (20)

Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker AutopilotCostruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
 
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
 
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker WorkshopAWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
 
Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)
 
Advanced Machine Learning with Amazon SageMaker
Advanced Machine Learning with Amazon SageMakerAdvanced Machine Learning with Amazon SageMaker
Advanced Machine Learning with Amazon SageMaker
 
Demystifying Machine Learning with AWS (ACD Mumbai)
Demystifying Machine Learning with AWS (ACD Mumbai)Demystifying Machine Learning with AWS (ACD Mumbai)
Demystifying Machine Learning with AWS (ACD Mumbai)
 
Building, Training and Deploying Custom Algorithms with Amazon SageMaker
Building, Training and Deploying Custom Algorithms with Amazon SageMakerBuilding, Training and Deploying Custom Algorithms with Amazon SageMaker
Building, Training and Deploying Custom Algorithms with Amazon SageMaker
 
Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)
 
End-to-End Machine Learning with Amazon SageMaker
End-to-End Machine Learning with Amazon SageMakerEnd-to-End Machine Learning with Amazon SageMaker
End-to-End Machine Learning with Amazon SageMaker
 
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
 
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
Building Machine Learning inference pipelines at scale | AWS Summit Tel Aviv ...
 
From Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMakerFrom Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMaker
 
ACDKOCHI19 - Demystifying amazon sagemaker
ACDKOCHI19 - Demystifying amazon sagemakerACDKOCHI19 - Demystifying amazon sagemaker
ACDKOCHI19 - Demystifying amazon sagemaker
 
Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018
Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018
Amazon SageMaker and Chainer: Tips & Tricks (AIM329-R1) - AWS re:Invent 2018
 
Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...
Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...
Building State-of-the-Art Computer Vision Models Using MXNet and Gluon (AIM36...
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
 
Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...
Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...
Building Machine Learning models with Apache Spark and Amazon SageMaker | AWS...
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
 
Building machine learning inference pipelines at scale (March 2019)
Building machine learning inference pipelines at scale (March 2019)Building machine learning inference pipelines at scale (March 2019)
Building machine learning inference pipelines at scale (March 2019)
 
Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)
 

More from Julien SIMON

An introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging FaceAn introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging Face
Julien SIMON
 
Reinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face TransformersReinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face Transformers
Julien SIMON
 
Building NLP applications with Transformers
Building NLP applications with TransformersBuilding NLP applications with Transformers
Building NLP applications with Transformers
Julien SIMON
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Julien SIMON
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Julien SIMON
 
Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)
Julien SIMON
 
Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)
Julien SIMON
 
Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)
Julien SIMON
 
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Julien SIMON
 
Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)
Julien SIMON
 
Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)
Julien SIMON
 
Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)
Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)
Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)
Julien SIMON
 

More from Julien SIMON (12)

An introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging FaceAn introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging Face
 
Reinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face TransformersReinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face Transformers
 
Building NLP applications with Transformers
Building NLP applications with TransformersBuilding NLP applications with Transformers
Building NLP applications with Transformers
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)
 
Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)
 
Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)
 
Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)
 
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
 
Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)
 
Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)
 
Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)
Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)
Deep Learning with Tensorflow and Apache MXNet on AWS (April 2019)
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)

  • 1.
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Optimizing Your Machine Learning Models on Amazon SageMaker A I M 3 6 1 R Julien Simon AI/ML Evangelist AWS Dr Steve Turner Head of Emerging Technologies, UKIR AWS
  • 3. Agenda 1. Welcome & housekeeping 2. An introduction to Automatic Model Tuning (AMT) and AutoML 3. Labs 4. Wrap-up and clean-up What you’ll learn today • How to use AMT to find optimal model hyperparameters • How to use AMT to explore deep learning architectures • How to use Amazon SageMaker Autopilot to find the optimal algorithm, data preprocessing steps and hyper parameters
  • 4. Our team today • Antje • Chris • Srikanth • Wei • Marc • Michael E • Matt • Mike • Guillaume • Michael M • Frank • Shashank • John • Abhi • Navjot • Bo • Boaz • Mohamed
  • 5. Housekeeping • Please be a good neighbor ☺ • Turn off network backups and any network-hogging app • Switch your phones to silent mode • Help the people around you if you can • Don’t stay blocked. Ask questions!
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 7. Hyperparameters Neural Networks Number of layers Hidden layer width Learning rate Embedding dimensions Dropout … XGBoost Tree depth Max leaf nodes Gamma Eta Lambda Alpha …
  • 8. Tactics to find the optimal set of hyperparameters • Manual Search: ”I know what I’m doing” • Grid Search: “X marks the spot” Typically training hundreds of models Slow and expensive • Random Search: “Spray and pray” « Random Search for Hyper-Parameter Optimization », Bergstra & Bengio, 2012 Works better and faster than Grid Search But… but… but… it’s random! • Hyperparameter Optimization: use ML to predict hyperparameters Training fewer models Gaussian Process Regression and Bayesian Optimization https://docs.aws.amazon.com/en_pv/sagemaker/latest/dg/automatic-model-tuning-how-it-works.html
  • 9. Setting hyperparameters in Amazon SageMaker • Built-in algorithms • Python parameters for the relevant estimator (KMeans, LinearLearner, etc.) • Built-in frameworks • hyperparameters parameter for the relevant estimator (TensorFlow, MXNet, etc.) • This must be a Python dictionary tf_estimator = TensorFlow(…, hyperparameters={'epochs’: 1, ‘lr’: ‘0.01’}) • Your code must be able to accept them as command-line arguments (script mode) • Bring your own container • hyperparameters parameter for Estimator • This must be Python dictionary • It’s copied inside the container: /opt/ml/input/config/hyperparameters.json
  • 10. Automatic Model Tuning in Amazon SageMaker 1. Define an Estimator the normal way 2. Define the metric to tune on • Pre-defined metrics for built-in algorithms and frameworks • Or anything present in the training log, provided that you pass a regular expression for it 3. Define parameter ranges to explore • Type: categorical (avoid if possible), integer, continuous (aka floating point) • Range • Scaling: linear (default), logarithmic, reverse logarithmic 4. Create an HyperparameterTuner • Estimator, metric, parameters, total number of jobs, number of jobs in parallel • Strategy: bayesian (default), or random search 5. Launch the tuning job with fit()
  • 11. Workflow Training JobHyperparameter Tuning Job Tuning strategy Objective metrics Training Job Training Job Training Job Clients (console, notebook, IDEs, CLI) model name model1 model2 … objective metric 0.8 0.75 … eta 0.07 0.09 … max_depth 6 5 … …
  • 12. Automatic Model Tuning in Amazon SageMaker • You can view ongoing tuning jobs in the AWS console • List of training jobs • Best training job • You can also query their status with the SageMaker SDK • Calling deploy() on the HyperparameterTuner deploys the best job • The best job so far if the tuning job has not yet completed
  • 13. Tips • Use the bayesian strategy for better, faster, cheaper results • Most customers use random search as a baseline, to check that bayesian performs better • Don’t run too many jobs in parallel • This gives the bayesian strategy fewer opportunities to predict • Instance limits! • Don’t run too many jobs • Bayesian typically requires 10x fewer jobs than random • Cost!
  • 14. Resources on Automatic Model Tuning Documentation https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning.html https://sagemaker.readthedocs.io/en/stable/tuner.html Notebooks https://github.com/awslabs/amazon-sagemaker-examples/tree/master/hyperparameter_tuning Blog posts https://aws.amazon.com/blogs/aws/sagemaker-automatic-model-tuning/ https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-produces-better-models-faster/ https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-now-supports-early-stopping-of- training-jobs/ https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-becomes-more-efficient-with-warm- start-of-hyperparameter-tuning-jobs/ https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-automatic-model-tuning-now-supports-random-search-and- hyperparameter-scaling/
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 16. AutoML • AutoML aims at automating the process of building a model • Problem identification: looking at the data set, what class of problem are we trying to solve? • Algorithm selection: which algorithm is best suited to solve the problem? • Data preprocessing: how should data be prepared for best results? • Hyperparameter tuning: what is the optimal set of training parameters? • Black box vs. white box • Black box: the best model only → Hard to understand the model, impossible to reproduce it manually • White box: the best model, other candidates, full source code for preprocessing and training → See how the model was built, and keep tweaking for extra performance
  • 17. AutoML with Amazon SageMaker Autopilot • SageMaker Autopilot covers all steps • Problem identification: looking at the data set, what class of problem are we trying to solve? • Algorithm selection: which algorithm is best suited to solve the problem? • Data preprocessing: how should data be prepared for best results? • Hyperparameter tuning: what is the optimal set of training parameters? • Autopilot is white box AutoML • You can understand how the model was built, and you can keep tweaking • Supported algorithms at launch: Linear Learner, Factorization Machines, KNN, XGBoost
  • 18. AutoML with Amazon SageMaker Autopilot 1. Upload the unprocessed dataset to S3 2. Configure the AutoML job • Location of dataset • Completion criteria 3. Launch the job 4. View the list of candidates and the autogenerated notebook 5. Deploy the best candidate to a real-time endpoint, or use batch transform
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. Labs 1. Use AMT to find optimal model hyperparameters for XGBoost 2. Use Autopilot to find the optimal algo, preprocessing steps and hyper parameters 3. Use AMT to explore deep learning architectures on Keras https://gitlab.com/juliensimon/aim361
  • 21. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.