Professional Documents
Culture Documents
REPEAT 1 Amazon SageMaker and PyTorch Tips & Tricks AIM407-R1
REPEAT 1 Amazon SageMaker and PyTorch Tips & Tricks AIM407-R1
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• Introductions
• Overview
• Hands-on demo
• Q&A
• Closing
Introductions
• Name
• Title and company
• Favorite thing you did on AWS
• Favorite thing you did with PyTorch
• Did you use Sagemaker before?
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Session flow
• Start
Setup notebook
instance
environment • Clone repo
• Download
Get data COLA data
• Quick review
• Run custom
Training PyTorch job
Inference
Sagemaker
Tips & Tricks
PyTorch
“An open source deep-learning platform that provides a seamless path from prototype to production.”
Amazon SageMaker
Build, train, and deploy machine learning models quickly
AWS Cloud
Notebook Hosting
AI Developers
Control
AWS Cloud
Notebook Hosting
SageMaker
Role
AI Developers
Control Data
AWS Cloud
Notebook Hosting
SageMaker
Role
AI Developers
Control Data Algorithms
AWS Cloud
Notebook Hosting
SageMaker
Role
AI Developers
…
PyTorch TensorFlow MXNet Chainer BYOA Amazon
Algorithms
Control Data Algorithms
AWS Cloud
Notebook Hosting
Jupyter SageMaker
Role
AI Developers
…
PyTorch TensorFlow MXNet Chainer BYOA Amazon
Algorithms
Control Data Algorithms
AWS Cloud
Notebook Hosting
Jupyter SageMaker
Role
AI Developers
…
PyTorch TensorFlow MXNet Chainer BYOA Amazon
Algorithms
Control Data Algorithms
AWS Cloud
Notebook Hosting
Jupyter SageMaker
Role
AI Developers
…
PyTorch TensorFlow MXNet Chainer BYOA Amazon
Algorithms
Control Data Algorithms
AWS Cloud
Notebook Hosting
Jupyter SageMaker
Role
AI Developers
…
PyTorch TensorFlow MXNet Chainer BYOA Amazon
Algorithms
Control Data Algorithms
AWS Cloud
Notebook Hosting
Jupyter SageMaker
Role
Distributed Cuda92
ing
Stream
…
PyTorch TensorFlow MXNet Chainer BYOA Amazon
Algorithms
Summary – 6 main tips:
1. Store your data in S3 instead of Sagemaker instance. (stream data for
very large datasets)
2. Separate your notebook, train and deploy instance types in code.
(optimize your billing period)
3. Use Sagemaker’s PyTorch library for training.
4. Use Lifecyle Configurations to never worry about an open notebook.
5. Deploy your model from Sagemaker as an endpoint.
6. Use Sagemaker’s hyperparameter optimization.
Questions?
Resources
• https://github.com/pytorch/pytorch
• https://sagemaker.readthedocs.io/en/stable/using_pytorch.html
• https://github.com/aws/sagemaker-pytorch-container
• https://aws.amazon.com/sagemaker/pricing/instance-
types/
• https://docs.aws.amazon.com/sagemaker/latest/dg/how-
it-works-hosting.html#how-it-works-hosting-related-
considerations
Learn ML with AWS Training and Certification
The same training that our own developers use, now available on demand
70+ free digital ML courses from AWS experts let you learn from
real-world challenges tackled at AWS
Visit https://aws.training/machinelearning
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.