Slide 1

Slide 1 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon Web Services Japan Machine Learning Solutions Architecht AWS ではじめる MLOps 第15回 MLOps 勉強会(Online)

Slide 2

Slide 2 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本⽇お話すること 2 l Amazon における機械学習 l AWS における MLOps l MLOps で使える AWS サービス AWS で MLOps やるとこんな感じなんだーと知っていただければ幸いです。

Slide 3

Slide 3 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon における機械学習

Slide 4

Slide 4 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.

Slide 5

Slide 5 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事例)Amazon Go : コンビニにおけるイノベーション • お客様が会計の為に並ばない • レジレスなコンビニ • 会計時のストレスを解消 • 各種認識技術を活⽤ • Computer Vision • Deep Learning • Fusion Sensor • ⾃動化している内容 • ユーザー認証(QR+顔認証) • 買い物の⾏動のトラッキング https://www.youtube.com/watch?v=NrmMk1Myrxc 5

Slide 6

Slide 6 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.

Slide 7

Slide 7 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.

Slide 8

Slide 8 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon Robotics: 物流における変⾰ ⼈とロボットが共に動き倉庫の⽣産性を向上 l 荷物の流量(InとOut)の増加 l 搬⼊搬出を速度化 l 従業員の⼿間やミスの軽減に貢献 l フロアスペースの効果的利⽤にも貢献 機械学習を駆使したルート制御 l 膨⼤な情報をクラウドに展開 l ロボット同⼠の衝突回避 https://www.youtube.com/watch?v=4sEVX4mPuto 8

Slide 9

Slide 9 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Photo by Victor Freitas on Unsplash by Jeff Bezos Undifferentiated Heavy Lifting 他との差別化になりづらい重労働

Slide 10

Slide 10 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS の機械学習スタック 10 AI サービス コード + DevOps Amazon CodeGuru Amazon DevOps Guru ビジネスプロセス Amazon Personalize Amazon Forecast Amazon Fraud Detector Amazon Lookout for Metrics 検索 Amazon Kendra 製造業 Amazon Monitron Amazon Lookout for Equipment Amazon Lookout for Vision ヘルスケア Amazon HealthLake Amazon Comprehend Medical Amazon Transcribe Medical ドメイン特化 チャットボット Amazon Lex テキスト & ドキュメント Amazon Translate Amazon Comprehend Amazon Textract ⾳声 Amazon Polly Amazon Transcribe Amazon Transcribe Call Analytics 動画像 Amazon Rekognition AWS Panorama コア機能 ML サービス エッジ デバイス 管理 ML学習 ノーコードML データ 準備 特徴量 ストア バイアス 検出 ノート ブック 管理と 監視 モデル 学習 本番への デプロイ パラメタ 最適化 説明 可能性 CI/CD ラベリ ング SAGEMAKER CANVAS SAGEMAKER STUDIO LAB AMAZON SAGEMAKER STUDIO IDE ML フレームワークと インフラストラクチャ PyTorch, Apache MXNet, TensorFlow Amazon EC2 CPUs GPUs AWS Trainium Elastic inference AWS Inferentia FPGA Habana Gaudi

Slide 11

Slide 11 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS における MLOps

Slide 12

Slide 12 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS ML Lens: 機械学習のための Well-Architected 12 l 優れた運⽤効率 l セキュリティ l 信頼性 ⼀般的な AWS の Well-Architected: 6つの柱に基づいてアーキテクチャを評価しよりよい設計を⽬指す Framework https://docs.aws.amazon.com/wellarchitected/latest/machine-learning-lens/machine-learning-lens.html l パフォーマンス効率 l コストの最適化 l 持続可能性 ML Lens: 機械学習ライフサイクルの各フェーズにおける Well-Architected 英語版の⽅が最新です

Slide 13

Slide 13 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps に関連する役割と責任範囲 13 データアーキテクト データエンジニア Machine Learning Lens https://docs.aws.amazon.com/wellarchitected/latest/machine-learning-lens/mloe-02.html データサイエンティスト AI/ML アーキテクト ML エンジニア MLOps エンジニア セキュリティエンジニア ソフトウェアエンジニア 1⼈で複数の役割を担うこともよくある データの収集 データの 前処理 特徴量 エンジニア リング モデルの作成 モデルの デプロイ モデルの監視 データ準備 MLモデル開発 構築・運⽤

Slide 14

Slide 14 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 代表的な開発体制 14 個⼈によってウェイトの違いはあるが、 基本的にチーム内で全部やる 1チームで全体を担当 複数チームで役割分担 モデル開発、MLOps、 アプリ開発 モデル開発を担当するチームと MLOps、アプリ開発のチームが分離 モデル開発 MLOps、アプリ開発 データサイエンティストチーム エンジニアチーム エンジニアチーム

Slide 15

Slide 15 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS のマネージドサービスを活⽤した MLOps の基本構成 15 Amazon SageMaker Pipelines Amazon Managed Workflows For Apache Airflow (MWAA) AWS Step Functions AWS CodePipeline Amazon SageMaker Series パイプライン開発ツール MLOps コンポーネント l ラベリング l データ処理 l 学習 l 実験管理 l モデル管理 l 推論エンドポイント l モデル性能監視 l Human in the loop l etc. その他 OSS なども利⽤可能 その他 OSS なども利⽤可能

Slide 16

Slide 16 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. そのほかの MLOps コンポーネント 16 Amazon Elastic Container Service (Amazon ECS) Amazon Elastic Kubernetes Service (Amazon EKS) ⾃前の MLOps を細かく作りこむ場合 Amazon SageMaker と MLflow で機械学習のライフサイクル管理の例 https://aws.amazon.com/jp/blogs/news/machine-learning- managing-your-machine-learning-lifecycle-with-mlflow-and- amazon-sagemaker/ Notebooks/Studio Amazon SageMaker データ処理 学習/評価 デプロイ Amazon S3 Amazon RDB Load balancer AWS Fargate MLflow server

Slide 17

Slide 17 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps で使える AWS サービス

Slide 18

Slide 18 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 基本的な MLOps の構成図 18 データ準備 MLモデル開発 構築・運⽤ 学習パイプライン 学習 データ 前処理 評価 実験管理 ⽣データ 加⼯済みデータ コード 管理 学習済みモデル CI/CDパイプライン 学習 データ 前処理 評価 承認 デプロイ 監視 データサイエンティスト 承認者 コード 管理 最新データ 試⾏錯誤・研究開発フェーズ トレーサビリティ コンテナ イメージ コンテナ イメージ ラベ リング 運⽤フェーズ

Slide 19

Slide 19 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 代表的な MLOps の構成図 19 データ準備 MLモデル開発 構築・運⽤ 学習パイプライン 学習 データ 前処理 評価 実験管理 ⽣データ 加⼯済みデータ コード 管理 学習済みモデル CI/CDパイプライン 学習 データ 前処理 評価 承認 デプロイ 監視 データサイエンティスト 承認者 コード 管理 最新データ 試⾏錯誤・研究開発フェーズ トレーサビリティ コンテナ イメージ コンテナ イメージ ラベ リング 運⽤フェーズ

Slide 20

Slide 20 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ラベリングの効率化︓Amazon SageMaker Ground Truth 20 画像分類 (マルチラベル対応) 物体検知 ⽂章分類 (マルチラベル対応) セマンティック セグメンテーション 固有表現抽出 ラベル検証 l テンプレートを使って数クリックでラベリングツールを作成可能 l メールアドレスで作業者を登録しラベリング依頼可能。ベンダへの依頼も可能。 l ⼤量データに対しては⾃動ラベリング機能によるラベリングコストの低減 動画分類 動画物体検出 動画物体追跡 Point cloud 物体検出 Point cloud 物体追跡 Point cloud セマンティック セグメンテーション

Slide 21

Slide 21 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 組み込みテンプレートから作成したラベリングツールの例 21 セマンティク セグメンテーションの例 いくつかポイントを 打つと領域を⾃動認識 して⾃動ラベリング

Slide 22

Slide 22 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 基本的な MLOps の構成図 22 データ準備 MLモデル開発 構築・運⽤ 学習パイプライン 学習 データ 前処理 評価 実験管理 ⽣データ 加⼯済みデータ コード 管理 学習済みモデル CI/CDパイプライン 学習 データ 前処理 評価 承認 デプロイ 監視 データサイエンティスト 承認者 コード 管理 最新データ 試⾏錯誤・研究開発フェーズ トレーサビリティ コンテナ イメージ コンテナ イメージ ラベ リング 運⽤フェーズ

Slide 23

Slide 23 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 統合開発環境(IDE)︓Amazon SageMaker Studio 23 l マネージドな Jupyter 環境をすぐに 利⽤可能。基本的なライブラリは インストール済み l 数クリックで、作成した Jupyter ノートブックのスナップショットを チームメンバに共有可能 l Jupyter ノートブックの処理を実⾏ するインスタンスをフレキシブルに 切り替え可能 l SageMaker が⽤意したビルトイン のカーネルのほかに、 カスタムイメージも利⽤可能 Web ブラウザから利⽤可能な機械学習のための IDE

Slide 24

Slide 24 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS を使った機械学習パイプライン構築⽅法の選択肢 24 Amazon SageMaker Pipelines Centric その他サービス Centric Misc. l Amazon SageMaker Studio を 使ってモデル開発を⾏う データサイエンティストを中⼼として MLOps を構築する場合におすすめ l SageMaker Studio を UI とすること で、AWS コンソールへのアクセスを 最⼩限に MLOps の構築・運⽤が可能 l 既存の DevOps の中に MLOps を 組み込むようなユースケースにおすすめ l OSS やさまざまな AWS サービスを 組み合わせやすい

Slide 25

Slide 25 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 基本的な MLOps の構成図 25 データ準備 MLモデル開発 構築・運⽤ 学習パイプライン 学習 データ 前処理 評価 実験管理 ⽣データ 加⼯済みデータ コード 管理 学習済みモデル CI/CDパイプライン 学習 データ 前処理 評価 承認 デプロイ 監視 データサイエンティスト 承認者 コード 管理 最新データ 試⾏錯誤・研究開発フェーズ トレーサビリティ コンテナ イメージ コンテナ イメージ ラベ リング 運⽤フェーズ

Slide 26

Slide 26 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 学習パイプライン構築に使えるサービス l サーバーレスオーケストレーション サービスを提供するサービス l 分散アプリケーション・マイクロ サービスの全体を 「ステートマシン」と呼ばれる しくみでオーケストレートできる l 定義したステートマシンは AWS コンソールから 「ワークフロー」という形式で ⾒やすく可視化できる l ステートマシンの各ステップの 実⾏履歴をログから追跡できる l Apache Airflowによる ワークフローを構築可能な マネージドサービス l ETLジョブやデータパイプ ラインを実⾏するワークフロー をマネージド型で実⾏可能。 開発者がビジネス上の課題解決 に注⼒できるようにする l Airflowのメトリクスを CloudWatchメトリクスとして 扱い、ログをCloudWatch Logs に 転送可能 Amazon SageMaker Pipelines Amazon Managed Workflows For Apache Airflow (MWAA) AWS Step Functions l 機械学習ワークロードの CI/CD を実現する Amazon SageMaker の機能 l 機械学習ワークフローのデータ ロードや学習処理などの⼀連の 処理ステップを任意のタイミング や所定の時間に実⾏できる l 各ステップの処理結果は SageMaker Experiments で 記録され、モデルの出来映えや 学習パラメータなどを視覚化可能 26

Slide 27

Slide 27 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. パイプライン管理ツール選択基準の例 l Step Functions Data Science SDK を使うことで、Python でワーク フローを構築 l さまざまな AWS サービスを組み 合わせたワークフローを作る l 今まで利⽤していた Apache Airflow をマネージドにするこ とで管理の⼿間を削減 l ワークフローの実⾏状況などを ダッシュボードでグラフィカル に確認 Amazon SageMaker Pipelines Amazon Managed Workflows For Apache Airflow (MWAA) AWS Step Functions l Amazon SageMaker Studio を 使うデータサイエンティスト中⼼の チームでスモールスタートしたい l Python で SageMaker の機能を 盛り込んだパイプラインを構築 27

Slide 28

Slide 28 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps コンポーネントとしての Amazon SageMaker 28 Amazon SageMaker 必要なリソースを⾃由に組み合わせてジョブを実⾏するコンテナオーケストレータ ジョブ実⾏時に使⽤した 学習データ、コンテナイメージ、 ソースコード、モデルは⾃動的に 関連付けて記録される 学習データ 実⾏環境 ソースコード Amazon S3 Amazon ECR リポジトリ (Git, CodeCommit, etc.) ジョブ専⽤ インスタンス (処理完了後 ⾃動削除)

Slide 29

Slide 29 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 試⾏錯誤のための学習パイプラインの例 29 データ前処理 モデルの学習 モデルの評価 評価結果に 応じた処理 Processing Job Training Job Processing Job Lambda w/container 前処理済みデータ 学習済みモデル 評価⽤ コンテナ 実験管理 (SageMaker Experiments) 処理⽤ コンテナ AWS Step Functions 共通部分をパイプラインにして⾃動化し、 使⽤するデータや学習スクリプトを変えながらより良いモデルを効率的に探索 https://aws.amazon.com/jp/builders-flash/202111/nyantech-ml-ops/?awsf.filter-name=*all 処理⽤ コンテナ 学習⽤ コンテナ

Slide 30

Slide 30 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. モデル作成時の試⾏錯誤に便利な SageMaker の機能 30 l ハイパーパラメタチューニング l 探索範囲を指定してベイズ最適化やランダムサーチでより良いパラメタを探索 l マネージドスポットトレーニング l スポットインスタンスを使ってコスト効率よくモデルを学習 l 分散学習 l 複数インスタンスを使って学習時間を短縮 l トレーニングコンパイラ new! l モデルをコンパイルしてから学習することで最⼤50%の学習効率向上 l Amazon SageMaker Experiments(実験管理) l モデルに関連する情報(データのS3パス、使⽤したコンテナイメージ、評価メトリクス、 ハイパーパラメタなど)を構造化データとして⼀元管理

Slide 31

Slide 31 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 基本的な MLOps の構成図 31 データ準備 MLモデル開発 構築・運⽤ 学習パイプライン 学習 データ 前処理 評価 実験管理 ⽣データ 加⼯済みデータ コード 管理 学習済みモデル CI/CDパイプライン 学習 データ 前処理 評価 承認 デプロイ 監視 データサイエンティスト 承認者 コード 管理 最新データ 試⾏錯誤・研究開発フェーズ トレーサビリティ コンテナ イメージ コンテナ イメージ ラベ リング 運⽤フェーズ

Slide 32

Slide 32 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CI/CD パイプライン管理ツール 32 AWS CodePipeline Amazon SageMaker Pipelines l 継続的デリバリーのための フルマネージドサービス l コード変更をトリガにビルド、テスト、 デプロイを⾃動実⾏するパイプライン を作成可能 l GitHub や Jenkins のような サードパーティの開発ツールを パイプラインに統合可能 AWS Step Functions

Slide 33

Slide 33 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CI/CD パイプラインの例 33 https://github.com/aws-samples/mlops-e2e

Slide 34

Slide 34 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CI/CD パイプラインの例 34 https://github.com/aws-samples/mlops-e2e モデル学習パイプライン は SageMaker Pipelines で構築 デプロイパイプラインは CodePipeline で構築 推論エンドポイントへの ⼊⼒データは DB に保存し、 モデルの再学習に利⽤

Slide 35

Slide 35 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon SageMaker を使った推論⽅法 35 バッチ推論(バッチ変換 ) l リアルタイム性が求められない推論向き l transform() でエンドポイントを起動 l 推論が終わるとエンドポイントが⾃動的に削除される l 推論時のみインスタンスを起動するためコスト効率⾼ 停⽌ EP 作成 推 論 停⽌ EP 作成 推 論 停⽌ 時間 ※ EP: エンドポイント 推論リクエスト 推論リクエスト l リアルタイムな推論を必要とする場合に選択 l deploy() でエンドポイントを構築できる l Web API の URL が発⾏され,URL にリクエストを送り推論 l オートスケールの設定が可能 l エンドポイント起動中は料⾦がかかるので注意 リアルタイム推論 ⼊⼒データ 推論結果 インスタンス S3 インスタンス ⼊⼒データ 推論結果

Slide 36

Slide 36 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon SageMaker を使った推論⽅法 36 ⾮同期推論 l リアルタイム推論と近い感覚で⾮同期で推論を実⾏ l リアルタイム推論ではタイムアウトするような重い推論を 実⾏する際に最適 l 最⼤1GBのペイロードサイズ、最⼤15分かかる推論に対応 l オートスケール設定も可能 ⼊⼒データ 推論結果 インスタンス S3 Internal queue サーバレス推論 new! (Preview中) l サーバレスのエンドポイントを使って推論 l コールドスタートを許容できるユースケースに最適 l エンドポイントのメモリサイズは 1〜6GB から選択可能 l ストレージサイズは 5GB 固定 l スケーリングポリシーを設定可能 サーバレスエンドポイント ⼊⼒データ 推論結果

Slide 37

Slide 37 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. リアルタイム推論のバリエーション 37 マルチモデルエンドポイント l 1つのエンドポイントに複数のモデルをデプロイ l 推論時のコスト削減に効果 マルチコンテナエンドポイント l 1つのエンドポイントに複数のモデルをコンテナごとデプロイ l 異なるフレームワークのモデルにも対応 l 推論時のコスト削減に効果 Amazon SageMaker Endpoint tokyo.tar.gz osaka.tar.gz nagoya.tar.gz hakata.tar.gz ⼊⼒データと モデル名 推論結果 Amazon SageMaker Endpoint pytorch_mnist model image tensorflow_mnist model image ⼊⼒データと モデル名 推論結果

Slide 38

Slide 38 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon SageMaker Blue/Green デプロイ機能 new! l Blue/Green デプロイにおいて、 トラフィックの振り分けを SageMaker が コントロールし、エンドポイントの 更新まで⾏えるようになった l これまで提供していた All At Once に 加えて、Canary と Linear (線形) の デプロイを容易に実装可能に l Amazon CloudWatch アラームと連携し て異常発⽣時の⾃動ロールバックが可能 Canary デプロイ https://aws.amazon.com/about-aws/whats-new/2021/11/new- deployment-guardrails-amazon-sagemaker-inference-endpoints/ 38

Slide 39

Slide 39 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Deep Learning 専⽤設計の推論インスタンス Inf1 39 l 機械学習の推論を低レイテンシかつ安価に実現する推論⽤チップ AWS Inferentia を搭載した Inf1 インスタンス l 同等の現⾏世代の GPU ベースの Amazon EC2 インスタンスと⽐較して、 スループットの最⼤ 2.3 倍向上、最⼤ 70% のコスト削減効果が期待できる l 4つのインスタンスサイズから選択でき、Intel Xeon Scalable プロセッサ搭載 https://aws.amazon.com/jp/blogs/news/choose-the-best-ai-accelerator-and-model-compilation-for-computer-vision-inference-with-amazon-sagemaker/ 100万推論あたりのコスト ($) c5 c5+Neo g4dn g4dn+Neo inf1 1時間あたりのトランザクション数 c5 c5+Neo g4dn g4dn+Neo inf1 1M 750K 500K 250K 0 10 8 6 4 0 2

Slide 40

Slide 40 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon SageMaker Inference Recommender new! 40 l 候補のインスタンスすべてに対する負荷テストとモデル調整を ⾃動化することで、本番環境に最適なインスタンスの特定を可能に l Amazon SageMaker Studio やノートブックでベンチマークの結果を確認し、 レイテンシー、スループット、コスト、コンピューティング、メモリなど、さ まざまな組み合わせ間のトレードオフを評価 l 許容される同時処理数やレイテンシにしきい値を設定し、 許容値を超えた場合、テストを打ち切って効率化 ⾃動テストを実⾏して推論に最適なインスタンスを推薦 https://aws.amazon.com/jp/blogs/news/announcing-amazon-sagemaker-inference-recommender/

Slide 41

Slide 41 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. リネージ追跡の機能追加 new! l SageMaker における機械学習 ワークフローの実⾏履歴 (リネージ) に 対して、ステップごとに情報を 検索するのではなく、関連情報を⼀括 で検索できるクエリ機能が追加 l たとえば、ある学習済みモデルに 紐づく前処理やトレーニングのジョブ をクエリ⼀つで抽出可能 l クロスアカウントでのクエリにも 対応し、複数組織にまたがる 開発・運⽤において、ガバナンス、 再現性確保などが可能に model package S3 のモデルデータ トレーニングジョブ トレーニング⽤ コンテナイメージ https://docs.aws.amazon.com/sagemaker/latest/dg/querying- lineage-entities.html https://github.com/aws/amazon-sagemaker- examples/tree/master/sagemaker-lineage 41

Slide 42

Slide 42 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. モデル監視︓Amazon SageMaker Model Monitor 42

Slide 43

Slide 43 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ML CI/CD パイプラインの事例 43 マネージドサービスを活⽤した機械学習 のためのCI/CDパイプラインの構築 株式会社ブレインパッド l パイプライン⾃動化によって運⽤後の モデル更新はマーケター (⾮エンジニア)が担当できるように l 学習パイプライン構築に AWS Step Functions Data Science SDK を使⽤ l データの前処理、モデル学習、評価には Amazon SageMaker を使⽤ l CI/CD パイプライン構築に AWS CodePipeline を使⽤ l モデルの監視のために Amazon QuickSight でダッシュボードを作成

Slide 44

Slide 44 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. まとめ

Slide 45

Slide 45 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS における MLOps 45 l 組織の ML 成熟度や開発体制にあわせて AI サービス、 ML サービス、ML フレームワークとインフラストラクチャを選択 l パイプライン管理ツールと MLOps コンポーネントを組み合わせて、 開発体制(組織構成)にフィットした MLOps を実現可能 l Amazon SageMaker は機械学習のためのコンテナオーケストレータ l Amazon SageMaker は MLOps コンポーネントの詰め合わせ l ⽤途に合う機能をピックアップして組み込み可能 実践 AWSデータサイエンス - エンドツーエンドのMLOpsパイプライン実装 AWS の機械学習サービスの使い⽅だけではなく、機械学習を組み込んだアプリケーション 開発を効率化するためにどのように AWS サービスを組み合わせると良いかなどが 解説されています。 https://www.amazon.co.jp/dp/4873119685/ref=cm_sw_em_r_mt_dp_5B7GAZ2X87X027WG37DE

Slide 46

Slide 46 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Appendix

Slide 47

Slide 47 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. SageMaker Project MLOps テンプレート 47 https://aws.amazon.com/jp/blogs/machine-learning/building-automating-managing-and- scaling-ml-workflows-using-amazon-sagemaker-pipelines/ SageMaker Studio から数クリックでデプロイ可能

Slide 48

Slide 48 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps on AWS の事例 48 https://aws.amazon.com/jp/blogs/news/brainpad-ml-cicd-pipeline/ マネージドサービスを活⽤した機械学習のためのCI/CDパイプラインの構築 株式会社ブレインパッド 運⽤開始後のモデル更新を⾮エンジニアであるマーケターができるよう、 モデル学習パイプラインの⾃動化やグラフィカルなダッシュボードを構築 https://d1.awsstatic.com/events/jp/2021/summit-online/CUS- 17_AWS_Summit_Online_2021_DENSO.pdf ⾼度運転⽀援向け画像認識のための Machine Learning Production Line 株式会社デンソー ⼤規模な画像を使ったモデル開発において、⽣産性向上、トレーサビリティを実現し、TCO (Total Cost of Ownership) の観点でコストの評価を実施

Slide 49

Slide 49 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps on AWS の事例 49 https://d1.awsstatic.com/events/jp/2021/summit-online/CUS- 45_AWS_Summit_Online_2021_KONAMI.pdf 遊戯王ニューロンにおける Amazon SageMaker の活⽤ ⼤規模画像データの MLOps 基盤構築 株式会社コナミデジタルエンタテインメント モデルの学習、⼤規模画像データを含むデータ管理、システム運⽤における課題を、 Amazon Managed Workflow for Apache Airflow や Amazon SageMaker で解決 https://d1.awsstatic.com/events/jp/2021/summit-online/CUS- 21_AWS_Summit_Online_2021_PKSHA_Technology.pdf 顧客最適な機械学習モデルを提供する対話エンジンサービスと Amazon SageMaker の活⽤事例 株式会社PKSHA Technology/株式会社BEDORE 従来 Amazon EC2 で⾏っていたモデル学習を Amazon SageMaker ベースの構成に切り替え、 開発者間、プロジェクト間での環境の統⼀や管理が必要なリソースの削減を実現

Slide 50

Slide 50 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps on AWS の事例 50 https://aws.amazon.com/jp/solutions/case-studies/pfcc/ 汎⽤原⼦レベルシミュレータ『Matlantis』のプラットフォームに Amazon EKS と Amazon EC2 GPU インスタンスを採⽤することでサービス化 の検討開始からわずか 6 か⽉で製品化 株式会社 Preferred Computational Chemistry 原⼦レベルで材料の挙動を再現することで⼤規模な材料探索を⾏う汎⽤原⼦レベルシミュ レータを Amazon Elastic Kubernetes Service (Amazon EKS) と Amazon EC2 GPU インスタン スを使って開発 https://aws.amazon.com/jp/blogs/news/cisco-uses-amazon-sagemaker- and-kubeflow-to-create-a-hybrid-machine-learning-workflow/ [AWS Blog] Cisco は、ハイブリッド機械学習ワークフローを作成するために Amazon SageMaker と Kubeflow を使⽤ モデル学習は⾃社の Cisco UCS ハードウェアで⾏い、推論に SageMaker 推論エンドポイント で⾏うワークフローを Amazon Elastic Kubernetes Service (Amazon EKS) と SageMaker Components for Kubeflow Pipelines を使って実現

Slide 51

Slide 51 text

© 2022, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. MLOps on AWS 関連のお客様のブログ記事 51 https://buildersbox.corp-sansan.com/entry/2021/08/30/110000 【Techの道も⼀歩から】第41回「SageMakerでStep Functionsを使った学習 パイプラインを構築するために概念を理解する」 Sansan株式会社 AWS Step Functions Data Science SDK と Amazon SageMaker を使って、 データの前処理、モデルの学習のパイプラインを構築 https://moneyforward.com/engineers_blog/2021/07/28/stepfunctions-sagemaker/ https://moneyforward.com/engineers_blog/2021/11/16/stepfunctions-sagemaker- endpoint-deploy/ StepFunctionsとSageMakerでML学習パイプラインをつくる StepFunctionsを使ってSageMakerエンドポイントのデプロイを実⾏する 株式会社マネーフォワード AWS Step Functions Data Science SDK と Amazon SageMaker を使ってモデルの学習パイプ ラインを構築したり、SageMaker 推論エンドポイントを使ったカナリアデプロイのパイプラ インを構築