SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
2018.03.08
AWS Black Belt Online Seminar
Amazon SageMaker
•
•
•
⎼ Amazon Athena
⎼ AWS Glue
⎼ Amazon SageMaker
• 2018 3 08
(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.
Agenda
SageMaker
SageMaker
•
• 1
1
• 1
•
•
SageMaker
SageMaker
4
SageMaker
•
•
•
•
•
•
•
•
•
Jupyter Notebook
•
•
• 3 *
⎼ ml.t2.medium
⎼ ml.m4.xlarge
⎼ ml.p2.xlarge
CreateTrainingJob API Docker
•
• 2
• m4, c4, c5, p2,
p3
•
S3
https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html
CreateEndpoint API Docker
• AB
•
•
https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html
https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/API_UpdateEndpoint.html
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/API_UpdateEndpointWeightsAndCapacities.html
SageMaker
SageMaker 2
AWS SDK
•
•
SageMaker SDK
•
• AWS SDK SageMaker SDK AWS SDK
scikit-learn
• Python Spark
• Jupyter Notebook
https://github.com/aws/sagemaker-python-sdk
https://github.com/aws/sagemaker-spark
create-endpoint
create-notebook-instance
create-training-job
delete-endpoint
delete-notebook-instance
describe-endpoint
describe-notebook-instance
…
estimator = TensorFlow(…)
estimator.set_hyperparameters(…)
estimator.fit(…)
predictor = estimator.deploy(…)
Predictor.predict(…)
SageMaker
1. SageMaker
2. Tensorflow/MXNet/Spark
3.
SageMaker
1. SageMaker
→
2. Tensorflow/MXNet/Spark
→
3.
→
SageMaker
•
•
•
•
•
•
•
•
• ) 2 (
• 2
• 2
New!
New!
https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
Image Classification
ResNet
• ResNet CNN
• ILSVRC 2015 1
• ImageNet
• use_pretrained_model
1 0
https://github.com/awslabs/amazon-sagemaker-examples/blob/master/introduction_to_amazon_algorithms/imageclassification_caltech/Image-classification-transfer-learning.ipynb
https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/He_Deep_Residual_Learning_CVPR_2016_paper.pdf
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/image-classification.html
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/IC-Hyperparameter.html
SageMaker
S3
estimator.fit()
SageMaker
S3
estimator.deploy()
SageMaker
S3
https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html
Tensorflow/MXNet/Spark
Tensorflow
• model_fn
• estimator_fn tensorflow.estimator
• keras_model_fn tf.keras
• train_input_fn
• eval_input_fn
• serving_input_fn
• input_fn
• output_fn
https://docs.aws.amazon.com/sagemaker/latest/dg/tf-training-inference-code-template.html
MXNet
• train
• save
• model_fn:
• transform_fn:
•
https://docs.aws.amazon.com/sagemaker/latest/dg/mxnet-training-inference-code-template.html
*
S3
SageMaker
S3
estimator.fit() .
AWS
SageMaker
S3
estimator.deploy()
AWS
SageMaker
S3
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/API_CreateTrainingJob.html
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/tf-example1-train.html
CreateTrainingJob
Hyperparameters
ECR
push
SageMaker
S3
S3ECR
SageMaker
M KD
estimator.fit() KD . M
MM
S3ECR
SageMaker
DM K estimator.deploy()
DM
docker run IMAGE_ID train
• train
• estimator.fit() docker run train
docker run IMAGE_ID serve
• serve
• estimator.fit() serve
• predictor.predict() /invocations
•
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
SageMaker
SageMaker 3
1:
• SageMaker
2: GPU
• AWS
AWS SDK SageMaker SDK
• SageMaker SDK
Jupyter Notebook
• AWS SDK
AWS SDK SageMaker SDK
• SageMaker SDK
Jupyter Notebook
• AWS SDK
SageMaker SDK AWS SDK
SageMaker API
CreateTrainingJob
CreateEndpointConfig
UpdateEndpoint
UpdateEndpointWeightsAndCapacities
EMR
SageMaker
EMR
EMR VPC
EMR Livy
https://aws.amazon.com/jp/blogs/news/build-amazon-sagemaker-notebooks-backed-by-spark-in-amazon-emr/
AWS
SageMaker
Presigned URL API
• CreatePresignedNotebookInstanceUrl
• AWS AWS
https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreatePresignedNotebookInstanceUrl.html
CreatePresignedNotebookInstanceUrl
CreateNotebookInstance
Presigned Instance URL Returned
Presigned Instance URL
Notebook Instance Request
Instance Created
SageMaker
→ instance_count 2
Tensorflow/MXNet
→ instance_count
→
Docker SageMaker
/opt/ml/input/config/resourceConfig.json
CloudWatch Logs
CloudWatch Logs
Tensorflow
AWS Tensorflow Docker
model_fn
source_dir
Tensorflow 1.4 1.5 Keras
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/tf-examples.html
=
2
• SageMakerVariantInvocationsPerInstance
⎼ 1 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
Tensorflow
AWS Tensorflow Docker
Tensorflow Serving
input_fn, output_fn
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/tf-examples.html
ONNX MMS
AWS MXNet Docker
SageMaker Model Server for Apache MXNet
(MMS)
MXNet ONNX
ONNX MXNet
SageMaker
• Chainer
• PyTorch
• Caffe2
• Microsoft Cognitive Toolkit
A/B
•
•
•
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/API_runtime_InvokeEndpoint.html
KMS key ID
SSE-KMS
• CreateTrainingJob
• CreateEndpointConfig
•
•
•
Cloudtrail
PCI DSS
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/
ML
• SageMaker
1
ML
•
• 0.14 USD/GB/
•
• 0.016 USD/GB
https://aws.amazon.com/jp/sagemaker/pricing/
3
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
https://github.com/awslabs/amazon-sagemaker-examples/tree/master/introduction_to_amazon_algorithms
https://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/algos.html
•
•
•
•
•
•
•
•
• ) 2 (
• 2
• 2
New!
New!
Tensorflow
• Tensorflow
• https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-
sdk/tensorflow_abalone_age_predictor_using_keras/tensorflow_abalone_age_predictor_using_keras.ipynb
• Tensorflow Tensorboard
• https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-
sdk/tensorflow_resnet_cifar10_with_tensorboard
• Tensorflow
• https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-
sdk/tensorflow_distributed_mnist/tensorflow_distributed_mnist.ipynb
• Keras + Tensorflow
• https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-
sdk/tensorflow_abalone_age_predictor_using_keras
• MXNet
• https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk
• scikit-learn SageMaker
SageMaker
• https://github.com/awslabs/amazon-sagemaker-
examples/blob/master/advanced_functionality/scikit_bring_your_own/scikit_bring_your_own.ipynb
• SageMaker R
• https://github.com/awslabs/amazon-sagemaker-
examples/blob/master/advanced_functionality/install_r_kernel/example_r_notebook.ipynb
• SageMaker
• https://github.com/awslabs/amazon-sagemaker-
examples/blob/master/advanced_functionality/handling_kms_encrypted_data/handling_kms_encrypted_data.ipynb
• XGBoost SageMaker
• https://github.com/awslabs/amazon-sagemaker-
examples/blob/master/advanced_functionality/xgboost_bring_your_own_model/xgboost_bring_your_own_model.ipynb
• Tensorflow Sagemaker
• https://github.com/awslabs/amazon-sagemaker-
examples/blob/master/advanced_functionality/tensorflow_iris_byom/tensorflow_BYOM_iris.ipynb
• Redshift MXNet R
• https://github.com/awslabs/amazon-sagemaker-examples/tree/master/advanced_functionality
AWS
• http://aws.amazon.com/jp/aws-jp-introduction/
• Q&A
• http://aws.typepad.com/sajp/
@awscloud_jp
http://on.fb.me/1vR8yWm
Twitter/Facebook
AWS
AWS
AWS
https://aws.amazon.com/jp/contact-us/aws-sales/
AWS
20180308 AWS Black Belt Online Seminar Amazon SageMaker

Contenu connexe

Plus de Amazon Web Services Japan

Plus de Amazon Web Services Japan (20)

202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
 
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
 
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
 
Amazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDD
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのこと
 
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
 
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
 
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
 
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
 
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
 
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
 
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
20211209 Ops-JAWS Re invent2021re-cap-cloud operations20211209 Ops-JAWS Re invent2021re-cap-cloud operations
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
 
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
 
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
 
20211109 JAWS-UG SRE keynotes
20211109 JAWS-UG SRE keynotes20211109 JAWS-UG SRE keynotes
20211109 JAWS-UG SRE keynotes
 
20211109 bleaの使い方(基本編)
20211109 bleaの使い方(基本編)20211109 bleaの使い方(基本編)
20211109 bleaの使い方(基本編)
 
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

20180308 AWS Black Belt Online Seminar Amazon SageMaker