Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Machine Learning: From Notebook to Production w...

Machine Learning: From Notebook to Production with Amazon SageMaker

Avatar for Tasio Guevara

Tasio Guevara

May 22, 2018

Other Decks in Technology

Transcript

  1. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Tasio Guevara Solutions Architect, Amazon Web Services Machine Learning: From Notebook to Production with Amazon SageMaker
  2. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Long History of ML at Amazon Thousands of Engineers Across the Company Focused on AI Personalized recommendations Inventing entirely new customer experiences Fulfillment automation and inventory management Drones Voice-driven interactions
  3. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Our Mission at AWS Is to Put Machine Learning in the Hands of Every Developer and Data Scientist
  4. The Machine Learning Process Data visualization & analysis Business problem

    ML problem framing Data collection Data integration Data preparation & Cleaning Feature engineering Model training & parameter tuning Model evaluation Are business Goals met? Model deployment Monitoring & debugging Predictions Yes No Data augmentation Feature Augmentation Re-training
  5. Discovery Business problem ML problem framing Help formulate the right

    questions • Domain knowledge • Define model required accuracy • Impact of false positives / negatives
  6. Integration Business problem ML problem framing Data collection Data integration

    Data preparation & cleaning Build the data platform • Amazon S3 • Amazon Kinesis • AWS IoT • AWS Glue • Amazon EMR • Amazon Athena • Amazon Redshift Spectrum
  7. Training Data visualization & analysis Business problem ML problem framing

    Data collection Data integration Data preparation & Cleaning Feature engineering Model training & parameter tuning Model evaluation • Setup and manage Notebook Environments • Setup and manage Training Clusters • Write data connectors • Scale ML algorithms to large datasets • Distribute ML training algorithm to multiple machines • Secure model artifacts
  8. Deployment Data visualization & analysis Business problem ML problem framing

    Data collection Data integration Data preparation & Cleaning Feature engineering Model training & parameter tuning Model evaluation Are business Goals met? Model deployment Monitoring & debugging Predictions Yes No Data augmentation Feature Augmentation Re-training • Setup and manage model inference clusters • Manage and Auto-Scale model inference APIs • Monitor and debug model predictions • Models versioning and performance tracking • Automate new model version promotion to production (A/B testing)
  9. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. A m a z o n S a g e M a k e r A managed service that provides the quickest and easiest way for your data scientists and developers to get ML models from idea to production
  10. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  11. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  12. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. UX … or Apache Spark through EMR and the SageMaker Spark SDK... Use SageMaker‘s hosted Notebook Instances... ... or SageMaker‘s Console for a point and click experience... ... or your own device (EC2, laptop, etc.)
  13. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  14. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Training Zero setup Streaming datasets + distributed compute Docker / ECS Infinitely scalable algorithms
  15. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  16. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Hosting One step deployment A/B testing Use your own model Deploy trained models locally or to SageMaker, Greengrass, DeepLens
  17. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  18. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Built-in Algorithms: Supervised Training XGBoost, Factorization Machines, Linear Learner for regression and classification DeepAR for time series forecasting Image classification with convolutional neural networks Seq2seq for translation
  19. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Built-in Algorithms: Unsupervised Training K-Means and PCA for clustering and pre- processing LDA and NTM for topic modeling Random Cut Forest for anomaly detection abc <0.19, 0.41, 0.12> xyz <0.16, 0.22, 0.93> BlazingText for text pre-processing
  20. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  21. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. TensorFlow and MXNet Containers … explore and refine models in a single Notebook Instance … deploy to production Sample your data… Use the same code to train on the full dataset in a cluster of GPU instances…
  22. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  23. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Bring Your Own Algorithm ... add algorithm code to a Docker container... Pick your preferred framework... ... publish to ECS Amazon ECS
  24. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker Components Amazon’s fast, scalable algorithms Idiomatic, distributed TensorFlow & MXNet Bring your own algorithm Hyperparameter optimization UX Hosting Training
  25. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Hyperparameter Optimization (Preview) Run a large set of training jobs with varying hyperparameters... ... and search the hyperparameter space for improved accuracy.
  26. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Demos 1. SageMaker built-in image classification without transfer learning. 2. SageMaker built-in image classification with transfer learning. 3. SageMaker MXNet and Gluon distributed training. 4. Bring your own algorithm – SciKit Learn.
  27. How Do I Get Started? • Getting started with Amazon

    SageMaker: https://aws.amazon.com/sagemaker/ • Use the Amazon SageMaker high-level SDK: • For Python: https://github.com/aws/sagemaker-python-sdk • For Spark: https://github.com/aws/sagemaker-spark • SageMaker Examples: https://github.com/awslabs/amazon-sagemaker-examples • Let us know what you build!
  28. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Thank you! https://aws.amazon.com/machine-learning/