[AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services,...
Transcript of [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services,...
![Page 1: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/1.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Makoto Shimura, Solutions Architect
2019/02/06
Amazon SageMaker
[AWS Black Belt Online Seminar]
![Page 2: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/2.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
•
⎼ Amazon Athena
⎼ AWS Glue
⎼ Amazon SageMaker
![Page 3: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/3.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Black Belt Online Seminar
•
•
①吹き出しをクリック②質問を入力③ Sendをクリック
#awsblackbelt
![Page 4: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/4.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 2019 02 06
AWS (http://aws.amazon.com)
• AWS
AWS
•
• AWS does not offer binding price quotes. AWS pricing is publicly available and is subject to
change in accordance with the AWS Customer Agreement available at
http://aws.amazon.com/agreement/. Any pricing information included in this document is provided
only as an estimate of usage charges for AWS services based on certain information that you
have provided. Monthly charges will be based on your actual use of AWS services, and may vary
from the estimates provided.
![Page 5: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/5.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
• Amazon SageMaker
• Amazon SageMasker
• SageMaker SDK
• [ | | ]
• Amazon SageMaker
•
![Page 6: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/6.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
![Page 7: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/7.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
推論推論
大量のCPU や GPU
継続的なデプロイ
様々なデバイスで動作
大量の GPU
大規模データの処理
試行錯誤の繰り返し
学習
学習に使うコードを記述
小規模データで動作確認
開発
![Page 8: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/8.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
推論推論
エンジニアがプロダク
ション環境に構築
API サーバにデプロイ
エッジデバイスで動作
学習開発
データサイエンティストが開発環境で作業
開発と学習を同じ 1 台のインスタンスで実施
Deep Learning であれば GPU インスタンスを使用
![Page 9: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/9.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
推論推論
エンジニアがプロダク
ション環境に構築
API サーバにデプロイ
エッジデバイスで動作
学習開発
データサイエンティストが開発環境で作業
開発と学習を同じ 1 台のインスタンスで実施
Deep Learning であれば GPU インスタンスを使用
& •
•
•
•
• API
•
•
![Page 10: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/10.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
![Page 11: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/11.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
![Page 12: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/12.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
![Page 13: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/13.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3 OK
-
-
( ml.t2.medium )
- IAM ( )
![Page 14: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/14.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
IAM c
S3
S3
* IAM
![Page 15: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/15.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
InService
Jupyter Jupyter Notebook
* JupyterLab JupyterLab
![Page 16: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/16.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Jupyter Notebook
SageMaker Examples
SageMaker Python Sdk
chainer_single_machine_cifer10.ipynb
Use
Create copy
![Page 17: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/17.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Chainer
1 SageMaker
Sagemaker Chainer
![Page 18: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/18.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sagermaker SDK
SDK
SDK github *
Chainer
estimator.fit()
estimator.deploy()
predictor.predict()
![Page 19: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/19.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
![Page 20: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/20.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
•
•
• 13
![Page 21: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/21.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
Jupyter Notebook
API
EC2
API AB
API
![Page 22: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/22.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
Jupyter Notebook
API
EC2
API AB
API
![Page 23: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/23.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
AWS CloudOffice Network
SageMaker Service
![Page 24: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/24.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
AWS CloudOffice Network
1.
2.
SageMaker Service
![Page 25: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/25.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker Service
Amazon SageMaker
AWS CloudOffice Network
1. SDK 4. 2.
3.
5.
![Page 26: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/26.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker Service
Amazon SageMaker
AWS CloudOffice Network
1. SDK
2.
3.
![Page 27: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/27.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker Service
Amazon SageMaker
AWS CloudOffice Network
1. SDK
2.
3.
4. S3
S3
5.
![Page 28: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/28.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker SDK
![Page 29: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/29.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker Python SDK & Examples
• github SDK
• SDK github
https://github.com/aws/sagemaker-python-sdk
https://github.com/awslabs/amazon-sagemaker-examples
![Page 30: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/30.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker SDK Estimator
Chainer Estimator
fit()
Chainer
S3
deploy()
predict()
transformer.transform()
S3
S3
![Page 31: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/31.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Chainer main
OK
SageMaker
argparse
model_fn()
SageMaker
![Page 32: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/32.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SDK
-
-
Deep Learning
Tensorflow ( Keras)
Chainer
PyTorch
MXNet ( Keras)
scikit-learn
Coach
Ray
-
![Page 33: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/33.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SDK
-
-
Deep Learning
Tensorflow ( Keras)
Chainer
PyTorch
MXNet ( Keras)
scikit-learn
Coach
Ray
-
![Page 34: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/34.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Linear Learner
• Factorization Machines
• XGBoost
• Image Classification
• seq2seq
• K-means
• k-NN
• Object2Vec
• Semantic Segmentation
• PCA
• LDA
• Neural Topic Model
• DeepAR Forecasting
• BlazingText (word2vec)
• Random Cut Forest
• Object Detection
• IP Insights
https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
![Page 35: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/35.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ID
ID
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html
![Page 36: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/36.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tensorflow
• Tensorflow, Chainer, PyTorch, MXNet, scikit-learn
SDK
• Tensorflow MXNet Keras
• Keras AWS blog *
• main
github
• github
https://github.com/aws/sagemaker-python-sdk
https://github.com/aws/sagemaker-containers* https://aws.amazon.com/jp/blogs/news/amazon-sagemaker-keras/
![Page 37: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/37.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker ECR
docker run $IMAGE_ID train
serve
ECR ID
https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-training-algo.html
https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html
![Page 38: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/38.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
[ ]
![Page 39: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/39.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• t2 p3
• 5GB-16TB
•
• Redshift, Athena, EMR
https://aws.amazon.com/jp/blogs/news/build-amazon-sagemaker-notebooks-backed-by-spark-in-amazon-emr/
https://aws.amazon.com/jp/blogs/news/build-fast-flexible-secure-machine-learning-platform-using-amazon-sagemaker-and-amazon-redshift/
![Page 40: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/40.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
git
• SageMaker git
•
• JupyterLab GUI
![Page 41: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/41.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
• →
•
•
![Page 42: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/42.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
[ ]
![Page 43: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/43.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• scikit-learn
instance_count 2
•
• /opt/ml/input/config/resourceConfig.json
SageMaker
• SDK estimator.fit(wait=False)
![Page 44: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/44.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Estimater hyperparameters
• SageMaker
•
https://github.com/aws/sagemaker-python-sdk#sagemaker-automatic-model-tuning
![Page 45: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/45.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Tensorflow SageMaker
pull
• SageMaker
• nvidia-docker
• local
https://github.com/aws/sagemaker-python-sdk#local-mode
![Page 46: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/46.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Search
•
• Accuracy Loss
• Linage
https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-now-comes-with-new-capabilities-for-
accelerating-machine-learning-experimentation/
![Page 47: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/47.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
[ ]
![Page 48: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/48.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
=
2
• 1
•
https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling.html#endpoint-auto-scaling-add-policy
https://docs.aws.amazon.com/ja_jp/autoscaling/application/userguide/application-auto-scaling-target-tracking.html
![Page 49: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/49.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A/B
•
•
•
•
•
![Page 50: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/50.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker
Embedding
https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipelines.html
Embedding
Classification
Client
Text
Numeric vector
Category
![Page 51: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/51.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Inference
• Elastic Inference CPU EC2 GPU ML
• CPU GPU
• 75%
•
• AWS enhanced versions of TensorFlow
• Apache MXNet (including ONNX)
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-ei.html
![Page 52: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/52.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
![Page 53: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/53.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker API
• SageMaker SDK
• AWS SDK SageMaker API
SageMaker SDK AWS SDK
![Page 54: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/54.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker 3
1:
SageMaker
2: GPU
AWS
3:
SageMaker
![Page 55: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/55.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Step Functions ML
• Step Functions SageMaker AWS Glue
Lambda
• Glue – SageMaker – –
https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sagemaker.html
CloudWatch
Events
AWS Step Functions workflow
ETL
![Page 56: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/56.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• ML
• SageMaker
1
• ML
•
• 0.14 USD/GB/
•
•
• 0.016 USD/GB
![Page 57: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/57.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker Example Notebooks
• https://github.com/awslabs/amazon-sagemaker-examples
SageMaker SDK
• https://github.com/aws/sagemaker-python-sdk
• Doc https://readthedocs.org/projects/sagemaker/
SageMaker
• https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/whatis.html
![Page 58: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/58.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Q&A
AWS Japan Blog https://aws.amazon.com/jp/blogs/news/
![Page 59: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/59.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
![Page 60: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/60.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Appendix
![Page 61: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/61.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ground Truth
• Amazon SageMaker Ground Truth
•
•
• Amazon Mecanical Turk 3
•
![Page 62: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/62.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ML Models in AWS Marketplace
Amazon SageMaker
200
![Page 63: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/63.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EMR
• SageMakerEMR
•EMR VPC
•EMR Livy
![Page 64: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/64.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Airflow Operator
• Airflow 1.10.1 SageMaker Operator
• Airflow SageMaker
https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/workflow/README.rst
![Page 65: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/65.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• RLEStimator
• Open AI Gym / Intel Coach / Berkeley Ray RLLibTensorflow / MXNet
• TensorForce StableBaselines
•
•• AWS : AWS RoboMaker, Amazon
Sumerian
• : MATLAB and Simulink
• : OpenAI Gym, Gym Roboschool, EnergyPlus
https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/rl
https://docs.aws.amazon.com/sagemaker/latest/dg/reinforcement-learning.html
![Page 66: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/66.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• CloudWatch Metrics
• CreateTraininJob API
• validation:cross_entropy
https://aws.amazon.com/jp/blogs/machine-learning/easily-monitor-and-visualize-metrics-while-training-models-on-amazon-sagemaker/
![Page 67: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/67.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• CloudWatch Logs
•
CloudWatch Logs
•
![Page 68: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/68.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PIPE
• 2
• FILE:
• PIPE: S3 API
• PIPE
• Tensorflow TFRecord
• MXNet RecordIO
• Chainer PyTorch
PIPE
![Page 69: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/69.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SageMaker Neo
• Neo SageMaker
•
•
https://aws.amazon.com/jp/blogs/news/amazon-sagemaker-neo-train-your-machine-learning-models-once-run-them-anywhere/
https://docs.aws.amazon.com/sagemaker/latest/dg/neo.html
• TensorFlow
• Apache MXNet
• PyTorch
• ONNX
• XGBoost
• EC2 c4/5, m4/5, p2/3
• Jetson TX1/2
• DeepLens
• Raspberry Pi 3 Model
![Page 70: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/70.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
:
• KMS key ID SSE-KMS
• CreateTrainingJob /
• CreateEndpointConfig
•
•
•
•
• Cloudtrail
• PCI DSS HIPPA
https://aws.amazon.com/about-aws/whats-new/2018/01/aws-kms-based-encryption-is-now-available-in-amazon-sagemaker-training-and-hosting/
https://aws.amazon.com/about-aws/whats-new/2018/01/aws-cloudtrail-integration-is-now-available-in-amazon-sagemaker/
https://aws.amazon.com/about-aws/whats-new/2018/01/amazon-sagemaker-achieves-pci-dss-compliance/
https://aws.amazon.com/about-aws/whats-new/2018/04/access-amazon-vpc-resources-for-training-and-hosting-with-amazon-sageMaker/
https://aws.amazon.com/about-aws/whats-new/2018/05/Amazon-SageMaker-Achieves-HIPAA-Eligibility/
https://aws.amazon.com/jp/about-aws/whats-new/2018/06/amazon-sagemaker-inference-calls-are-supported-on-aws-privatelink/
![Page 71: [AWS Black Belt Online Seminar] Amazon SageMaker...2019/02/06 · © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminar • •](https://reader033.fdocuments.us/reader033/viewer/2022060418/5f15a0353944bc70a33bba5a/html5/thumbnails/71.jpg)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
:
• SageMaker S3 S3 VPC
• S3
• S3
• SageMaker API PrivateLink
• SageMaker Notebook Endpoint
• SageMaker Service API
• SageMaker Runtime API
https://aws.amazon.com/blogs/machine-learning/direct-access-to-amazon-sagemaker-notebooks-from-amazon-vpc-by-using-an-aws-privatelink-endpoint/
https://aws.amazon.com/about-aws/whats-new/2018/04/access-amazon-vpc-resources-for-training-and-hosting-with-amazon-sageMaker/
https://aws.amazon.com/jp/about-aws/whats-new/2018/06/amazon-sagemaker-inference-calls-are-supported-on-aws-privatelink/
https://aws.amazon.com/about-aws/whats-new/2018/08/amazon-sagemaker-apis-supported-on-aws-privatelink/