AWS机器学习平台SageMaker 亚马逊DamonDeng
2020-02-27 144浏览
- 1.Amazon SageMaker 端到端的托管机器学习平台 Damon Deng,AWS资深架构师 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 2.解决计算机科学中十分困难的问题 学习 语言 洞察 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 解决 解释
- 3.ML @AWS:Our mission 为开发者和数据科学家打造机器学习平台 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 4.数以万计的用户在AWS上运行机器学习 AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营
- 5.AWS上的机器学习技术堆栈 应用服务 平台服务 视觉: Amazon Rekognition Image Amazon Rekognition Video Amazon Machine Learning (Amazon ML) 语音: Amazon Polly Amazon Transcribe 语言: Amazon Lex Amazon Translate Amazon Comprehend Amazon SageMaker Spark & Amazon EMR Amazon Mechanical Turk AWS 深度学习镜像 框架和 基础架构 TensorFlow Apache MXNet on AWS GPU Cognitive Toolkit Caffe2 & Caffe CPU AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS PyTorch IoT (AWS Greengrass) Keras Gluon Mobile
- 6.AWS上的机器学习技术堆栈 应用服务 平台服务 视觉: Amazon Rekognition Image Amazon Rekognition Video Amazon Machine Learning (Amazon ML) 语音: Amazon Polly Amazon Transcribe 语言: Amazon Lex Amazon Translate Amazon Comprehend Amazon SageMaker Spark & Amazon EMR Amazon Mechanical Turk AWS 深度学习镜像 框架和 基础架构 TensorFlow Apache MXNet on AWS GPU Cognitive Toolkit Caffe2 & Caffe CPU AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS PyTorch IoT (AWS Greengrass) Keras Gluon Mobile
- 7.机器学习流程 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 8.机器学习流程 业务问题 – 重新训练 数据收集 ML问题转换 数据调整 数据集成 监控 调试 特征工程 数据准备 和清洗 模型训练 参数调整 数据可视化 和分析 – 预测 参数调整 模型校验 否 符合 业务目标? AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 模型部署 是
- 9.Amazon SageMaker A fully managed service that enables data scientists and developers to quickly and easily build machine-learning based models into production smart applications. 一个 全托管服务 ,可以帮助数据科学家和开发者快速而轻松地 构建基于机器学习的模型的生产环境智能应用 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 10.Amazon SageMaker 预配置的 构建 notebook 实例 全托管的 可扩展平台 高度优化的 机器学习算法 部署 训练 机器学习,深度学 习,定制算法 一键训练 部署过程 不需要工程支撑 超参数优化 更容易的训练过程 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 11.Amazon SageMaker 从创新想法到实际模型实现的十分快速、简单的方法 $ 端到端机器学习平台 零配置 多样的模型训练 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 按秒付费
- 12.Amazon SageMaker 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 13.Amazon SageMaker 的组件 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 14.构建 使用Amazon SageMaker托管的笔 记本实例… … 或者通过Amazon EMR和Amazon SageMaker Spark SDK使用Apache Spark... ... 或Amazon SageMaker控制台的 点击操作... AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS ... 或者您的设备 (Amazon Elastic Compute Cloud (Amazon EC2), laptop等.)
- 15.Amazon SageMaker 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 16.训练 一键式训练 流式数据集+分布式 计算 Docker / Amazon Elastic Container Service (Amazon ECS) AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 训练好的模型既可以部署 在本地也可以部署在 Amazon SageMaker, AWS Greengrass, AWS DeepLens
- 17.Amazon SageMaker 的组件 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 18.部署 一键式部署 低延迟,高吞吐, 高可靠 自动A/B测试 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 自带模型
- 19.Amazon SageMaker的组件 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 20.内置算法 用于监督学习 的XGBoost, FM,线性和预 测算法 Kmeans,PCA 和Word2Vec用 于聚类和预处理 卷积神经网络的 图像分类 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 用于话题建模的 LDA和NTM,用 于翻译的 seq2seq
- 21.Amazon SageMaker的组件 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 22.主流深度学习框架容器 采样数据… …在单独的 Notebook实例中探 索和细化模型 使用相同的代码在 实例集群上对完整 数据集进行训练… AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS … 部署在生产环境
- 23.Amazon SageMaker的组件 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 24.自带算法 选择您首选的算法... ... 把算法代码加入 到Docker容器中... AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS ...发布到Amazon ECS
- 25.Amazon SageMaker的组件 构建 训练 部署 Amazon高性能,可扩展的算法 分布式TensorFlow, Apache MXNet, Chainer, PyTorch 自带算法 超参数调优 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 26.超参数挑优 (模型自动调优) 用不同的超参数进行大量的训练作业... ... 搜索超参数空间提高模型精度 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 27.客户端应用 推理响应 推理请求 Amazon SageMaker Amazon Elastic Container Registry (Amazon ECR) 真实情况 Inference Endpoint 辅助代码 推理代码 模型部署(在Amazon EC2上) 训练数据 模型结果 推理代码 训练代码 辅助代码 模型训练(在Amazon EC2上) AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 训练代码
- 28.Amazon SageMaker 1 2 I Notebook 实例 3 4 I I I 算法 模型训练服务 模型部署服务 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 29.1 零配置 数据探索分析平台 “Just add data” I Notebook实例 Authoring & Notebooks 访问 Amazon Simple Storage Service (Amazon S3) 数据湖 对AWS数据库服务 的ETL访问 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS • 推荐、个性化 • 欺诈检测 • 预测 • 图像分类 • 流失预测 • 市场活动、邮件的定位 • 日志处理,异常检测 • 语音文字转换 • 其它更多…
- 30.AmazonSageMaker:10倍速 算法支持 2 Training code I 算法 • • • • • • Matrix Factorization Regression Principal Component Analysis K-Means Clustering Gradient Boosted Trees 更多算法! 自带脚本 (SM构建好的容器) Apache Spark 集成 AWS提供的算法 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 自带算法(自己通过容器构建)
- 31.全托管的、灵活的 分布式训练 3 – 安全保障 保存模型 获取训练数据 I 训练代码 模型训练服务 Amazon ECR • • • • • • Matrix Factorization Regression Principal Component Analysis K-Means Clustering Gradient Boosted Trees 更多算法! 自带脚本 (SM构建容器) Apache Spark 集成 AWS提供的算法 GPU CPU 全托管 保存推理镜像 – AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 自带算法(自己通过容器构建) HPO
- 32.轻松将模型部署到Amazon SageMaker 4 模型结果 推理Endpoint 实例类型: c3.4xlarge 初始实例数量: 3 模型名称: prod I 版本名称: primary 模型部署服务 50 30 在推理容器中保存多个 版本的镜像. Prod 是主 要版本,支持50% 用户 流量 初始版本权重: 50 生产版本 10 10 一键部署 推理镜像 模型版本 Endpoint 配置 AWS提供的算法 Amazon ECR Amazon SageMaker AWS 中国(宁夏)区域由西云数据运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 中国(北京)区域由光环新网运营
- 33.内置的机器学习算法 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 34.线性算法 二元分类 预测0/1结果 回归 预测一个数值 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 35.线性学习器的使用场景 • 分类 • 根据过去客户的反馈,选择是否发邮件给这个特定的客户? 是/否 • 根据过去客户的分类,判断该客户属于哪个细分类别? “空巢老人”,“郊区居 民”或“城市白领” • 回归 • 根据过去邮件的投资回报率(ROI),邮件此客户的投资回报率是多少? AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 36.XGBoost • Extreme Gradient Boosting • 基于Gradient Boosting决策树算法(GBDT) • 通过组合一组相对简单,能力较弱的模型,把它们的预测结果 相加来预测目标变量 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 37.XGBoost AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营
- 38.XGBoost AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 39.XGBoost 的使用场景 • 分类 • 回归 • 排行 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 40.因子分解机(Factorization Machines) • 线性回归的泛化 • 每个特征的单独权重 vs k维向量代表特征之间的关系 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 41.因子分解机使用场景 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 42.图像分类 • 将图像分类为多个类别中的一类 • ResNet • 非常深的网络(默认为152层) • 两种使用模式 • 全量学习 (从随机参数开始训练,需要大量数据,结果准确) • 迁移学习 (利用公开成熟的模型,替换最后的一层或几层全联通层, 不需要很多数据也能训练) AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 43.图像分类 AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营
- 44.Sequence to Sequence (seq2seq) • 输入一个序列并获得另一个序列作为输出。 • 编码器和解码器 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 45.seq2seq 的使用场景 • 机器翻译 • 以一种语言输入一个句子,并预测该句子在另一种语言中的含义 • 文字摘要 • 输入较长的单词串,并通过作为摘要的较短的单词串输出 • 语音转文字 • 输入一段音频,通过转化输出相应的文字 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 46.DeepAR • 时间序列预测 • 亚马逊内部使用的算法 • 训练一组相关的时间序列,以获得更多的见解和更高的预 测能力 • 最小化特征引擎 • 预测 • 值 (销量为 x) • 概率 (出售金额在 x 和 y 之间的概率 z) AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 47.DeepAR 的使用场景 • 预测 • 产品需求量 • 供应链优化 • 服务器负载 • 网页请求 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 48.K-Means 聚类 • 将数据分成 K 个离散的群集 • 基于特征的相似性 • 群集内的成员尽可能相似,群集间的成员尽可能不同 AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营http://www.cnblogs.com/lexus/archive/2012/12/08/2808826.html
- 49.K-Means聚类的使用场景 • 搜索 • 客户划分 • 根据购物记录进行划分 • 根据网站、应用、平台上的用户行为进行划分 • 根据喜好和行为特征建构用户描述信息 • 库存分类 • 根据销售情况分组 • 根据生产情况分组 AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营
- 50.主成分分析 (PCA) • 数据降维(降低特征的数量) • 将特征映射到具体的成分 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 51.主成分分析 (PCA) 使用场景 • • • • • 数据压缩 图像处理 探究性数据分析 高维度数据的模式识别 金融,生物信息,心理学,数据挖掘 AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营
- 52.隐含狄利克雷分布 (LDA) • 在文本语料库中,发现文档中的主题 • 每次输入都是一份文档 • 特征是每个单词是否存在(或出现个数) • 对文档的分类为该文档的主题 • 主题通过对每个文档中出现的单词的概率分布进行机器学 习 • 每个文档最终被描述为一些主题的集合 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 53.隐含狄利克雷分布 (LDA)https://tedunderwood.com/2012/04/07/topic-modeling-made-just-simple-enough/AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 54.Latent Dirichlet Allocation (LDA) 使用场景 • 根据相关性和相似性对文档进行分类和组织 • 文档摘要 • 根据含义对大规模文档进行情感分类, 如文本,图像,歌 词 AWS 中国(宁夏)区域由西云数据运营 AWS 中国(北京)区域由光环新网运营
- 55.Neural Topic Modelling (NTM) • 在文本语料库中,发现文档中的主题 • LDA vs NTM • 两种不同的算法会在同一数据集上产生不同的结果 • NTM 通常具有较低的混淆度 • LDA 在少数主题上训练非常快,但不像 NTM 那样扩展到更多 主题 结论:如果使用场景中需要判断很多主题和更好的“合适度 (fit) ” ,则使用 NTM,否则使用 LDA。 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 56.BlazingText • 生成 Word2Vec • 生成文档中各单词的矢量表示 • 获取其中的意义,单词和上下文之间的语义关系 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 57.BlazingText 的使用场景 • 用于自然语言处理 (NLP) • • 情绪分析 • 更好的了解客户 • 确定产品趋势 机器翻译 • • 为网站提供多语言支持 命名实体识别 • 从文字中获取组织与主要参与者信息 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 58.客户案例 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 59.AmazonSageMaker:初始用户 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 60.Intuit使用Amazon SageMaker获得的好处 From To 需要临时设置 和管理notebook环境 使用Amazon SageMaker notebook轻松完成数据探索工作 有限的模型部署选择 通过虚拟化手段 达成极强的灵活性 团队之间需要争抢计算资源 自动扩展的模型部署环境 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 61.使 用 A m a z o n S a g e M a k e r 在 AW S 上 构 建几 乎 实时 的 欺诈 检 测 特征存储 特征计算 模型训练 (Amazon SageMaker) 训练 Reader Data Amazon SageMaker Model Cleanser 查询 Processor 模型部署 (Amazon SageMaker) Amazon SageMaker 客户端服务 Amazon EMR AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 62.Amazon SageMaker 样例端到端架构: 风格转移 Amazon S3 Coco 数据集 训练 基于Amazon S3的静态网站托管 构建 Amazon SageMaker Notebooks 训练 算法 Amazon SageMaker 训练 Amazon Cloudfront Amazon SageMaker Hosting AWS CodeCommit AWS Lambda AWS CodePipeline Amazon ECR AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 部署 Amazon API Gateway 预测请求
- 63.Amazon SageMaker 端到端的托管机器学习平台 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 64.AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
- 65.本PPT来自2018携程技术峰会 更多技术干货,请关注“携程技术中心”微信公众号 AWS 中国(宁夏)区域由西云数据运营 中国(北京)区域由光环新网运营 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS