More Related Content
Similar to Automatic-Labelling-and-Model-Tuning-with-Amazon-SageMaker (20)
More from Amazon Web Services (20)
Automatic-Labelling-and-Model-Tuning-with-Amazon-SageMaker
- 2. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://bit.ly/2MxHNLB
- 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Automatic Labelling and Model
Tuning with Amazon
SageMaker
Adam Lynch
Partner Solutions Architect
Amazon Web Services
S e s s i o n I D
- 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Agenda
Introduction – 15 min
Overview of Amazon SageMaker GroundTruth – 15 min
Lab Automatic Labelling with Amazon SageMaker GroundTruth – 45 min
Working Lunch – 15 min
Lab Private Workforce Labelling – 30 min
Overview of Model Tuning using Bayesian Optimisation – 15 min
Lab Automatic Model Tuning with Amazon SageMaker – 45 min
- 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Account for the Labs
In order to complete this workshop you'll need an AWS Account
with admin access
There are resources required by this workshop that are eligible for
the AWS free tier if your account is less than 12 months old.
And we will supply some credits for other tasks.
- 6. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What data science tasks can be automated?
- 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Data science tasks
- 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AutoML – definition and goals
AutoML aims to maximise the performace of machine learning programs
without human assistance and subject to a computational budget.
Core goals:
a) Good performance: good generalization performance across various
input data and learning tasks can be achieved.
b) No assistance from humans: configurations can be automatically done
for machine learning tools.
c) High computational efficiency: the program can return a reasonable
output within a limited budget.
Taking the Human out of Learning Applications:
A Survey on Automated Machine Learning
Quanming Yao et al. arXiv:
1810.13306v3 [cs.AI] 17 Jan 2019
- 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
The challenges of AutoML adoption
Deep Learning Human Design Computational
Budget
- 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Some tough challenges in machine learning
Availability of Labelled Data The Road Not Travelled Drift
- 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Promising approaches
Learning to Learn Simulation Reinforcement Learning
- 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
KERAS
AI SERVICES
ML SERVICES
ML FRAMEWORKS +
INFRASTRUCTURE C5 C5n
P3 P3dn
Vision Speech Languages Chatbots Vertical
AMAZON
SAGEMAKER
AMAZON SAGEMAKER
GROUND TRUTH
AMAZON
SAGEMAKER RL
AWS MARKETPLACE
FOR ML
AMAZON
SAGEMAKER NEO
AWS
DEEPRACER
AWS
DEEPLENS
AMAZON ELASTIC INFERENCE
AWS INFERENTIA
AWS GREENGRASS
AMAZON
PERSONALIZE
AMAZON
FORECAST
AMAZON
TEXTRACT
AMAZON
REKOGNITION
AMAZON
LEX
AMAZON
POLLY
AMAZON
TRANSCRIBE
AMAZON
COMPREHEND
AMAZON
TRANSLATE
N E W
N E W
N E W
- 14. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Data labeling and machine learning
Labeled data
Model
training
Prepare and
label data
Inference
- 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Data labeling is hard…
Need to label large datasets
Requires humans to perform labeling
Becomes time consuming and costly
Difficult to achieve high accuracy for
labels
- 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker: Build, train, and deploy ML
1
2
3
1
2
3
- 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
K E Y F E A T U R E S
Automatic labeling via
machine learning
Ready-made and
custom workflows
Label
management
Private and public
human workforce
Amazon SageMaker Ground Truth
Label machine learning training data easily and
accurately
- 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker Ground Truth
How it works
- 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker Ground Truth
How it works
- 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker Ground Truth
How it works
- 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker Ground Truth
How it works
- 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker Ground Truth
How it works
- 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Step 1: Create a Ground Truth labeling job
- 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Step 2: Provide details for a labeling job
- 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Step 2: Provide details for a labeling job
- 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Step 2: Provide details for a labeling job
- 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Labeling job is now running
- 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Labeling app: Human workers label the
images
- 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Management Console: View labels for
images
- 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Management Console: View labels
- 32. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 33. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 34. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 35. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Solving the following problem:
𝑚𝑎𝑥 𝑥 ∈ 𝐴 𝑓(𝑥)
- 38. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Defining ‘A’ using Amazon SageMaker
"ParameterRanges": {
"CategoricalParameterRanges":
[
{ "Name": "tree_method",
"Values": ["auto", "exact", "approx", "hist"]}
],
"ContinuousParameterRanges":
[
{ "Name": "eta", "MaxValue" : "0.5", "MinValue": "0" }
],
"IntegerParameterRanges":
[
{ "Name": "max_depth", "MaxValue": "10", "MinValue": "1", }
]
}
- 39. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
On Amazon Sagemaker – configure the tuning
job
tuning_job_config = {
"ParameterRanges": {…}
"ResourceLimits": { "MaxNumberOfTrainingJobs": 20, "MaxParallelTrainingJobs": 3 },
"Strategy": "Bayesian",
"HyperParameterTuningJobObjective": {
"MetricName": "validation:auc",
"Type": "Maximize"
}
}
- 40. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Launch the tuning job
tuning_job = smclient.create_hyper_parameter_tuning_job(
HyperParameterTuningJobName = "MyTuningJob“,
HyperParameterTuningJobConfig = tuning_job_config,
TrainingJobDefinition = training_job_definition)
- 41. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 42. Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Adam Lynch
atlynch@amazon.com