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

Amazon SageMaker Hands-on Workshop

Amazon SageMaker Hands-on Workshop

Yoshitaka Haribara

November 22, 2021
Tweet

More Decks by Yoshitaka Haribara

Other Decks in Technology

Transcript

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

    rights reserved. Amazon SageMaker Hands-on Workshop Yoshitaka Haribara, Ph.D. AWS Startup Solutions Architect @_hariby 2021-11-22
  2. Yoshitaka Haribara, Ph.D. AWS Startup Solutions Architect Tokyo, Japan 2018幎

    AWS Japan 入瀟。 ゜リュヌションアヌキテクトずしお日本の スタヌトアップに察する AWS 導入支揎を行っおおり、 特に機械孊習基盀の蚭蚈・構築や、 開発䜓制の敎備にた぀わる盞談を手掛ける。 趣味はドラム。奜きなドラマヌは Dave Weckl, Chad Smith (Red Hot Chili Peppers) など。
  3. 3 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS ML stack 最も広範か぀充実した機械孊習のサヌビス矀 VISION SPEECH TEXT SEARCH CHATBOTS PERSONALIZATION FORECASTING FRAUD DEVELOPMENT CONTACT CENTERS Ground Truth AWS Marketplace for ML Neo Augmented AI Built-in algorithms Notebooks Experiments Processing Model training & tuning Debugger Autopilot Model hosting Model Monitor Deep Learning AMIs & Containers GPUs & CPUs Elastic Inference Inferentia FPGA Amazon Rekognition Amazon Polly Amazon Transcribe +Medical Amazon Comprehend +Medical Amazon Translate Amazon Lex Amazon Personalize Amazon Forecast Amazon Fraud Detector Amazon CodeGuru AI SERVICES ML SERVICES ML FRAMEWORKS & INFRASTRUCTURE Amazon Textract Amazon Kendra Contact Lens For Amazon Connect SageMaker Studio IDE Amazon SageMaker DeepGraphLibrary Deep Java Library
  4. 4 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 機械孊習のワヌクフロヌは反埩的か぀耇雑 トレヌニングデヌタを収集しお準備 MLアルゎリズムを遞択たた は独自モデルを持ち蟌み トレヌニング環境の 蚭定ず管理 モデルのトレヌニング、 デバッグ、チュヌニング トレヌニング 実行の管理 本番環境での モデルの展開 モデルの モニタリング 予枬の怜蚌 本番環境の拡匵ず管理
  5. 5 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker でモデル構築、トレヌニング、デプロむ トレヌニングデヌタを収集しお準備 完党マネヌゞド型デヌタ凊理ゞョブ/ デヌタラベル付けのワヌクフロヌ MLアルゎリズムを遞択たたは 独自モデルを持ち蟌み コラボレヌティブ・ノヌトブック ビルトむンアルゎリズム/モデル トレヌニング環境の蚭定ず管理 ワンクリックでトレヌニング モデルのトレヌニング、 デバッグ、チュヌニング デバッグず 最適化 トレヌニング実行の 管理 実隓を芖芚的に远跡しお 比范する 本番環境での モデルの展開 ワンクリック展開ず 自動スケヌリング モデルの モニタリング コンセプトのドリフ トを自動的に怜出 予枬の怜蚌 予枬のヒュヌマンレ ビュヌを远加 本番環境の拡匵ず管理 完党マネヌゞド型 自動スケヌリングで 75% 削枛 ML甚りェブベヌスのIDE モデルの自動構築ずトレヌニング
  6. 6 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | ML を簡単に ワンクリックでトレヌニング/デプロむ、 ビルトむンアルゎリズム、 自動チュヌニング 拡匵可胜なパフォヌマンス パワフルな GPU ぞのオンデマンドアクセス 自動拡匵、分散トレヌニング 費甚察効果の高さ デヌタラベリングのコストを最倧70% 削枛、マ ネヌゞされたスポットトレヌニング、クラりド 垂堎においお最安倀の掚論モデル セキュリティ セキュリティ機胜の充実したセット ネットワヌク分離、アクセス制埡、暗号 化、コンプラむアンス DevOps 察応 Kubernetes で実行するオプションを備えた 完党マネヌゞド型の MLOps 少なくずも 54% 他のクラりドベヌスのオプショ ンずの比范で 䜎い TCO 効率的に 100台 のGPUに拡匵可胜 単䞀 IDE Webベヌスのビゞュアルむ ンタヌフェむスですべおの MLステップを実行する 幅広い コンプラむアンス SOC | PCI | ISO | フェドラム | HIPAA | GDPR | FIPS KUBERNETES ず Kubebflow の統合 6 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | Amazon SageMaker ML向け ゚ンド to ゚ンド ゜リュヌション
  7. 7 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 10倍 開発者の生産性を 向䞊させたす 詳现に぀いおは、ブログ蚘事をご参照ください http://bit.ly/mlTCO 3幎間にわたり、最䜎 54% 䜎い TCO を 提䟛したす Amazon SageMaker Security Compliance Operations ML infrastructure
  8. 10 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 兞型的な SageMaker ナヌスケヌス 予知保党 補造、自動車、IoT 需芁予枬 小売、消費財、補造 䞍正行為 怜出機胜 金融サヌビス、 オンラむン小売 信甚リスク予枬 金融サヌビス、小売 文曞からのデヌタ 抜出ず分析 医療、法務、メディア/ ゚ンタヌテむメント、 教育 コンピュヌタ ビゞョン ヘルスケア、補薬、補 造 自動運転 自動車、茞送 パヌ゜ナラむズされた 掚奚事項 メディア&゚ンタヌテむンメ ント、小売、教育 チャヌン 予枬 小売、教育、゜フトりェ ア、むンタヌネット http://bit.ly/ sagemaker-use-cases
  9. 11 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | カスタマむズされた゜リュヌション : デヌタセット、AWS CloudFormation テンプレヌト 及び参照アヌキテクチャを䜿甚しお、数回のクリックで SageMaker に簡単にデプロむできたす Amazon SageMaker でトップナヌスケヌス向けに カスタマむズされた ゜リュヌション すぐに䜿えるモデルを䜿甚するこずも、 特定のナヌスケヌスに合わせおカスタマむズ するこずもできたす 数回のクリックで SageMaker にデプロむ 簡単にデヌタセットをポむント 詳现に぀いおは、䞋蚘リンクをご芧ください https://aws.amazon.com/ sagemaker/getting-started/ ML゜リュヌションを 1 日以内に立ち䞊げ
  10. 12 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 12 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | お客様事䟋
  11. 13 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Lyftは、米囜ずカナダで最倧の亀通ネットワヌクの䞀぀であり、2017幎に Level 5の自動運転車 (Autonomous Vehicle) 郚門を立ち䞊げ、数癟䞇人ものラむダヌを支揎する自動運転システムを開発したした。 Amazon SageMaker 分散トレヌニングを䜿甚しお、モデルのトレヌニング時間を数日から数時間に短瞮した した。AWS で機械孊習過皋を暙準化するこずで、開発サむクルを合理化し、コストを削枛し、最終的に自動 運転機胜をお客様に提䟛するずいうミッションを加速したした。 —アレックス・ベむン Lyft Level 5のMLシステムのリヌド
  12. 14 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | バラバラな ML ゜リュヌションの乱立 チヌム間での共同䜜業が困難 開発サむクルの長期化、コストの増加 PROBLEM トレヌニングを SageMaker で暙準化 オンデマンドたたはマネヌゞドスポットむ ンスタンスを䜿甚した単䞀ノヌドおよび分 散トレヌニング SOLUTION モデルトレヌニング時間を数日から数時間 未満に短瞮 (分散トレヌニングクラスタヌを䜿甚) ゚ンゞニアリングコストの削枛 IMPACT 14 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |
  13. 15 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | SOLUTION ARCHITECTURE Lyft Level 5 トレヌニングデヌタ Amazon S3 に保存さ れたモデル成果物 コンテナ マネヌゞドスポット、 分散型および単䞀ノヌド トレヌニング Training jobs Amazon SageMaker GPUs
  14. 16 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 3TB以䞊のデヌタ、週 1,500時間以䞊の再生時間 リアルタむム統蚈のML゜リュヌションが必芁、 リヌンチヌム、デヌタ・サむ゚ンスの専門知識なし PROBLEM Next Gen Stats (NGS) 遞手やゲヌムボヌルの RFID タグから AWS に ラむブデヌタを配信 1秒未満で100ステップ以䞊のデヌタ凊理 リアルタむム予枬 APIずオンスクリヌングラフィック経由で公開 される統蚈情報の出力及び画面䞊のグラフィック SOLUTION 20以䞊の統蚈を即座に起動 スポヌツアナりンサヌはファンを惹き぀ける興味 深いデヌタポむントを取埗 IMPACT 16 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |
  15. 17 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | SOLUTION ARCHITECTURE Next Gen Stats ゜リュヌション党䜓を AWS で実行 Amazon SageMaker では、MLモデルを 既存の分析パむプラむンにデプロむで きたす ストリヌミングデヌタアヌキテクチャ 150ms Apache Kafka Real-time data Data distributors Stadium Stats FTP Tracking data Traditional stats NGS processors Amazon SageMaker ML processors NGS Datastore Websites NGS API Club tools 1000ms
  16. 18 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | トム゜ン・ロむタヌ様は、倧芏暡な ML を掻甚 したいず考えおいたした。 セキュリティポリシヌぞのコンプラむアンスを確 保しながら、デヌタぞの安党なアクセスが必芁。 PROBLEM Secure Content Workspaces (SCW) SCWは、瀟内セキュリティ暙準に準拠したデヌタ ぞのアクセスを提䟛。 Amazon SageMaker は、SCW を通じお有効化さ れ、完党マネヌゞド型の機械孊習環境を提䟛。 SOLUTION デヌタサむ゚ンティストは、トム゜ン・ロむタヌ様 のポリシヌに埓い、安党に倧芏暡な実隓をできるよ うになりたした。 クラりド・コンピュヌティング・リ゜ヌスぞのス ムヌズなアクセスにより、トム゜ン・ロむタヌ様の 顧客にむンテリゞェントでタむムリヌな゜リュヌ ションを提䟛できたす。 IMPACT ビゞネスおよびプロフェッショナル向けの、 むンテリゞェントで信頌性の高い情報のリヌディング゜ヌス 18 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |
  17. 19 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | SOLUTION ARCHITECTURE Thomson Reuters Amazon SageMaker の SCW では、 適切な暩限、セキュリティ、 ナヌザヌロヌルなどのデヌタぞの アクセスを蚱可できたす。 コンピュヌティングオプションぞの 完党マネヌゞドアクセス: CPU、GPU、スポットむンスタンス。 Reads models Amazon SageMaker Model Building TR content owner Scientist Managed Spot Training Scientist’s secure storage TR content SageMaker Notebook environment SCW Github Enterprise Amazon SageMaker Training Amazon SageMaker Hosting GPUs Scientist’s secure storage Creates “workspace” and “services” Requests access to TR data Grants access to TR content Provisions Notebook environment Provisions Grants Launches (start, stop, open) Data science Discovery Interactive model building Launches training at scale Writes models
  18. 20 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 「Cinnamon AI は、Amazon SageMaker マネヌゞドスポットトレヌニングで ML モデルのトレヌニングコストを 70% 節玄」 https://aws.amazon.com/jp/blogs/news/cinnamon-ai-saves-70-on-ml-model- training-costs-with-amazon-sagemaker-managed-spot-training/
  19. 21 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 「効率的にむンテル® FPGA ゚ッゞデバむス䞊の深局孊習掚論を実行する」 https://aws.amazon.com/jp/blogs/startup/using-fewer-resources-to-run-deep-learning- inference-on-intel-fpga-edge-devices/ AWS Cloud AWS IoT Greengrass Certified DE10-Nano Amazon SageMaker Amazon SageMaker Ground Truth Optimized Model AWS IoT Core Amazon Kinesis Data Firehose Camera AWS IoT Greengrass Image Inference Results LeapMind Deep Learning Accelerator IP Cyclone® V SoC FPGA Training Data Amazon ECR Blueoil Docker Image Label Lambda function Training Output
  20. 22 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | “Making Amazon SageMaker and TensorFlow Work for You — Mobileye guest post” https://medium.com/@julsimon/making-amazon-sagemaker-and-tensorflow- work-for-you-893365184233
  21. 23 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 「AWS IoT & Amazon SageMakerを䜿った魚矀食欲解析システムの実珟」 https://speakerdeck.com/umitron/aws-iot-and-amazon-sagemakerwoshi- tutayu-qun-shi-yu-jie-xi-sisutemufalseshi-xian-number-awsdevday Ø»ÖÖ¶à€¶Í·ÏÎ Ï“Ï¥Î Ï¯ • ÏƒÊ”Î»Î·Î¿Ï„à¡žà©’ÉºÏžÏƒÏ§à°†Ù›ÉºÏ„ÏšÊ”Ï‡Ï¯Î¬ÉŸÎœÏ¡Ê”Ï‡Ï¯Î¬ÉºÏƒÏ“Ï©Î Î‡Í°Î¯Ê”Ï…Í°Ø…àœ§ • ÏšÏÏ¡Ê”Í Í¯Éºà¶Œà£­Î›àž­Í­ • UMITRONÍ·Î±Ê”ÏÎµÍ±Í Í¯àœ¢àŒ»Í¢Î”ÏžÏƒÏ§ÍžÒ°Í­Í·GitHubꡯɈϤ • à¬žÍ·Ï“Ï©ÎŒÎ«Ï„Í°à¢–ÍØ»ÖÖ¶à€¶ÍŽØ”Í¢Î”à·³àšºÍ·ÏžÏƒÏ§Î‹Ø…àœ§ 36
  22. 24 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS Startup ブログ「日本のスタヌトアップにおける AI/ML 事䟋」 https://aws.amazon.com/jp/blogs/startup/tech-case-study-jp- startup-ai-ml/
  23. 25 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 25 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | Amazon SageMaker の 䞻な機胜
  24. 26 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker: 機胜の抂芁 SageMaker Ground Truth 完党マネヌゞド型 デヌタのラベル付け SageMaker Studio Notebooks ゚ラスティック・コンピュヌ ティングによるワンクリック のノヌトブック One-click Training 簡単に トレヌニングゞョブを実行 Automatic Model Tuning ワンクリックでハむパヌパ ラメヌタの最適化 One-click Deployment リアルタむム、バッチおよび マルチモデルをサポヌト Model Monitor コンセプトドリフトを 自動怜出 SageMaker Processing ビルトむンの Python、 BYO R/Spark Built-in and bring your-own algorithms 監芖付き/ 監芖なしアルゎリズム SageMaker Experiments すべおのステップを キャプチャ、敎理、比范 SageMaker Neo 䞀床のトレヌニングで どこにでも展開 AWS Marketplace 事前構築されたアルゎリズム およびモデル SageMaker Debugger トレヌニング実行を デバッグ Inf1/Amazon Elastic Inference 高パフォヌマンスを 最䜎コストで提䟛 Managed Spot training トレヌニングコストを 90%削枛 Amazon Augmented AI モデル予枬のヒュヌマンレ ビュヌ機胜を远加 SageMaker Studio SageMaker Autopilot 自動的にモデルを構築・ トレヌニング SageMaker Studio以倖のコンポヌネント SageMaker Studioに含たれるコンポヌネント
  25. 27 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Studio 完党に統合された 機械孊習の開発環境 (IDE) 倧芏暡なコラボレヌション コヌドの䟝存性を远跡する必芁なし 簡単な実隓管理 数千件の実隓を敎理、远跡、比范 自動モデル生成 コヌドを曞かずに完党な可芖化ず制埡が可胜 高品質な ML モデル 自動的に゚ラヌをデバッグ、モデルを監芖、高品質を維持 生産性の向䞊 統合されたビゞュアルむンタヌフェむス䞊で、コヌド、構 築、トレヌニング、デプロむ、および監芖を実行
  26. 28 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Studio を䜿甚した モデル構築ず品質管理
  27. 29 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Autopilot 完党な可芖性ず制埡を䌎う モデルの自動䜜成 クむックスタヌト デヌタを衚圢匏で提䟛し、察象予枬を指定 モデルの自動䜜成 フィヌチャ゚ンゞニアリングでMLモデルを取埗するず モデルのチュヌニングが自動的に完了 Visibility and control ゜ヌスコヌドでモデル甚のノヌトブックを入手 掚奚事項ず最適化 リヌダヌボヌドを入手し、モデルの改善を継続
  28. 31 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | SageMaker Autopilot でテヌブルデヌタの回垰・分類 デヌタ分析 特城量 ゚ンゞニアリング モデル チュヌニング モデル完成
  29. 32 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker は、Kubernetes ず統合できたす Amazon SageMaker Operators for Kubernetes 2 Amazon SageMaker Components for Kubeflow Pipelines 1 Pipelines
  30. 33 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker セキュリティ機胜で アむデアから本番皌働たでの 時間を短瞮 むンフラストラクチャずネットワヌクの分離 プラむベヌトネットワヌク経由で SageMaker コンポヌネント間の デヌタ通信を制埡し、シングルテナンシヌで適切な入出力を確保 認蚌ず承認 Amazon SageMaker リ゜ヌスを䜿甚するために、誰が認蚌・ 承認され埗るナヌザヌであるかを定矩、実行、監査 デヌタ保護 保管䞭および移動䞭のデヌタの自動暗号化を確実にし、 独自のキヌを柔軟に䜿甚可胜 監芖ず監査可胜性 すべおの API コヌル・むベント・デヌタアクセス/むンタラクションを、 ナヌザヌず IPレベルたで远跡・トレヌス・監査し、迅速な修埩を確実に コンプラむアンス認定 最も包括的なコンプラむアンス管理を継承し、 お客様の業界の法的芁件を遵守したす
  31. 37 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | トレヌニングデヌタの収集ず準備 トレヌニングデヌタの収集ず準備 フルマネヌゞド型のデヌタ凊理ゞョブ/ デヌタラベル付けのワヌクフロヌ Choose or bring your own ML algorithm Collaborative notebooks, built-in algorithms/models Set up and manage environments for training One-click training Train, debug, and tune models Debugging and optimization Manage training runs Visually track and compare experiments Deploy model in production One-click deployment and autoscaling Monitor models Automatically spot concept drift Validate predictions Add human review of predictions Scale and manage the production environment Fully managed with auto-scaling for 75% less ML甚りェブベヌスのIDE モデルの自動構築ずトレヌニング
  32. 38 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Ground Truth 機械孊習を䜿甚しお高粟床な トレヌニングデヌタセットを 構築 デヌタラベル付けのコストを削枛 最倧 70% アノテヌタにアクセス Amazon Mechanical Turk (クラりド゜ヌシング)、 アマゟン認定ベンダヌ、たたは自瀟のアノテヌタ 正確な結果を迅速に実珟 ビルトむンのデヌタラベル付けワヌクフロヌ 3D ポむントクラりド、ビデオ、画像、テキストをサポヌト
  33. 39 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 良いモデルには高品質のデヌタが必芁です
  34. 40 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Ground Truth の仕組み Raw data Amazon S3ぞの 未加工デヌタの入力 Labeling カスタムたたは ビルトむンの ワヌクフロヌを䜿甚し ラベル付けゞョブを䜜成 Worker 異なる アノテヌタヌ グルヌプから遞択 Assistive labeling アノテヌタヌは、ラベリング 支揎機胜を備えたラベリング UI を䜿甚しおタスクを完了 正確な トレヌニング デヌタセット Amazon SageMaker Ground Truth 機械孊習のトレヌニング デヌタのラベル付けを 倧芏暡か぀簡単に実行
  35. 41 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Processing デヌタ凊理ずモデル評䟡の ための分析ゞョブ 完党マネヌゞド型 クラスタの分散凊理の実珟 カスタム凊理 フィヌチャ゚ンゞニアリング甚の独自のスクリプトをご持参 ください コンテナサポヌト SageMaker のビルトむンコンテナを䜿甚するか、独自のコ ンテナをご持参ください セキュリティずコンプラむアンス SageMaker のセキュリティ機胜ずコンプラむアンス機胜を掻甚 自動䜜成ず自動終了 リ゜ヌスは自動的に䜜成、蚭定、終了
  36. 42 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | アルゎリズムの遞択たたは構築 Collect and prepare training data Fully managed data processing jobs/ data labeling workflows Set up and manage environments for training One-click training Train, debug, and tune models Debugging and optimization Manage training runs Visually track and compare experiments Deploy model in production One-click deployment and autoscaling Monitor models Automatically spot concept drift Validate predictions Add human review of predictions Scale and manage the production environment Fully managed with auto-scaling for 75% less ML甚りェブベヌスのIDE モデルの自動構築ずトレヌニング 独自のMLアルゎリズム を遞択たたは持参 コラボレヌティブ・ノヌトブック ビルトむンアルゎリズム/モデル
  37. 43 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Studio Notebooks 共有可胜・高速起動 ノヌトブック シングルサむンオン (SSO) で簡単アクセス ノヌトブックに数秒でアクセス 完党マネヌゞド型で安党 管理者によるアクセスず暩限の管理 迅速なセットアップ コンピュヌティングリ゜ヌスを皌働させずに ノヌトブックを起動 簡単なコラボレヌション ワンクリックでノヌトブックの共有 柔軟性 コンピュヌティングリ゜ヌスを起動・シャットダりン
  38. 44 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 分類 リニアラヌナヌ | XGBoost | KNN Amazon SageMaker にはアルゎリズムが組み蟌たれ おいたす 独自のアルゎリズムの 持蟌みも可胜です テキストの操䜜 BlazingText | 監芖察象 | 監芖なし シヌケンス倉換 Seq2Seq コンピュヌタビゞョン 画像分類 | オブゞェクト怜出 | セマンティックセグメンテヌション 回垰分析 リニアラヌナヌ | XGBoost | KNN 異垞怜出 ランダムにカットされたフォレスト | IPむンサ むト クラスタリング KMeans 機胜削枛 PCA レコメンデヌション 因数分解機 トピックモデリング LDA | NTM 予枬 DeepAR
  39. 45 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS Marketplace for Machine Learning ML 向け AWS Marketplace で アルゎリズム、モデル、 およびデヌタを賌入 AWS マヌケットプレむスを参照たたは怜玢 ワンクリックで賌入 Amazon SageMaker で利甚可胜 https://aws.amazon.com/marketplace /solutions/machine-learning
  40. 47 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | モデルのトレヌニングずチュヌニング Collect and prepare training data Fully managed data processing jobs/ data labeling workflows Deploy model in production One-click deployment and autoscaling Monitor models Automatically spot concept drift Validate predictions Add human review of predictions Scale and manage the production environment Fully managed with auto-scaling for 75% less Choose or bring your own ML algorithm Collaborative notebooks, built-in algorithms/models トレヌニング環境の蚭定ず管理 ワンクリックでトレヌニング モデルのトレヌニング、 デバッグ、チュヌニング デバッグず 最適化 トレヌニング実行 の管理 実隓を芖芚的に远跡しお 比范する ML甚りェブベヌスのIDE モデルの自動構築ずトレヌニング
  41. 48 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker は 1クリック で お客様のモデルを トレヌニング シングルパス トレヌニング メモリに瞛られない 再トレヌニング甚 チェックポむント お客様独自のア ルゎリズムをト レヌニング デフォルトで 分散型 デヌタストリヌム䞊 でのトレヌニング
  42. 49 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon EC2 P4d むンスタンス (NVIDIA A100 Tensor Core GPU) • 前䞖代の P3/P3dn むンスタンスず比范し、 平均 2.5x のパフォヌマンス、60% 䜎いコスト • p4d.24xlarge • 8x A100 GPU • 96 vCPU, 1152 GB Memory • GPU間は 600 GB/s の NVSwitch/NVLink • むンスタンスあたり 400 Gbps ENA/EFA • ロヌカルストレヌゞ: 8x 1 TB NVMe SSD • オンデマンド䟡栌 $32.77 / hour • cf. p3dn.24xlarge: $31.212 / hour https://aws.amazon.com/jp/ec2/instance-types/p4/
  43. 50 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon EC2 DL1 むンスタンス (Habana Gaudi) • 最新䞖代の GPU むンスタンスに比べ 40% 良いコストパフォヌマンス • dl1.24xlarge • 8x Gaudi Accelerator from Habana Labs (an Intel company) • 96 vCPU, 768 GB Memory • Accelerator 間 100 GB/s (双方向) • むンスタンスあたり 400 Gbps ENA/EFA • ロヌカルストレヌゞ: 4x 1 TB NVMe SSD • オンデマンド䟡栌 $13.11 / hour • cf. p4d.24xlarge: $32.77 / hour p3dn.24xlarge: $31.212 / hour • Habana SynapseAI® SDK を利甚
  44. 51 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS Trainium (Preview) • AWS により蚭蚈された機械孊習トレヌニングチップ • クラりドで ML モデルをトレヌニングするための 最も良いコスト効率ず最倧の TFLOPS 性胜を提䟛 • AWS Inferentia 同様 Neuron SDK を利甚し、 TensorFlow, MXNet, PyTorch などのフレヌムワヌク をサポヌト • Trainium チップは、画像分類、セマンティック怜 玢、翻蚳、音声認識、自然蚀語凊理、レコメンデヌ ション゚ンゞンなど、アプリケヌションの深局孊習 ワヌクロヌド向けに特別に最適化 • Amazon EC2 (AWS Deep Learning AMI) に加え、 Amazon SageMaker, Amazon ECS, EKS, AWS Batch などのマネヌゞドサヌビスで利甚可胜予定 Coming in 2021!
  45. 53 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker の 自動モデルチュヌニング (HPO) お客様のアルゎリズムの ハむパヌパラメヌタヌを自動調敎 倧芏暡チュヌニング 䜕千もの異なるアルゎリズムパラメヌタ の組み合わせを調敎 自動化 MLを䜿甚しお最適なパラメヌタを芋぀ける 高速化 数日たたは数週間の面倒な手䜜業を排陀 決定朚 決定朚の深さ | 最倧の葉ノヌド | Gamma | Eta | Lambda | Alpha ニュヌラルネットワヌク レむダヌ数 | 隠れ局の幅 | 孊習率 | 埋め蟌み次元 | ドロップアりト EXAMPLES
  46. 54 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 3rd party の HPO フレヌムワヌクも利甚可胜 「Amazon SageMaker で Optuna を甚いたハむパヌパラメヌタ最適化を実装する」 https://aws.amazon.com/jp/blogs/news/amazon-sagemaker-optuna-hpo/
  47. 55 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Experiments トレヌニング実隓の敎理、 远跡、比范 倧芏暡トラッキング 実隓ずナヌザヌ間でパラメヌタヌず指暙をトラッキング 敎理のカスタム チヌム、目暙、仮説による実隓の敎理 可芖化 実隓を簡単に芖芚化し、比范 メトリックずロギング Python SDKおよびAPIを䜿甚したカスタムメトリックの蚘録 高速反埩 迅速に反埩し、高品質を維持
  48. 56 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Experiments を䜿甚し 䜕千もの実隓を远跡・管理
  49. 57 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Debugger 分析ずデバッグ、 説明可胜性、アラヌト生成 関連するデヌタキャプチャ 分析甚にデヌタを自動キャプチャ デヌタ分析ずデバッグ コヌド倉曎無しのデヌタ分析ずデバッグ 自動゚ラヌ怜出 ゚ラヌはルヌルに基づき自動怜出 アラヌトによる生産性向䞊 アラヌトに基づき修正措眮を実行 ビゞュアル分析ずデバッグ SageMaker Studio による芖芚的分析ずデバッグ
  50. 58 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Debugger を䜿甚し 募配消倱などの問題を特定
  51. 59 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | モデルの展開ず管理 Collect and prepare training data Fully managed data processing jobs/ data labeling workflows Choose or bring your own ML algorithm Collaborative notebooks, built-in algorithms/models Set up and manage environments for training One-click training Train, debug, and tune models Debugging and optimization Manage training runs Visually track and compare experiments 本番環境での モデル展開 ワンクリックの展開 ず自動スケヌリング モニタリング モデル スポットコンセプ トドリフトの自動 怜知 予枬の怜蚌 予枬ぞの ヒュヌマンレビュヌを 远加 本番環境の拡匵ず管理 フルマネヌゞドの自動スケヌリン グを75%のコスト削枛で提䟛 ML甚りェブベヌスのIDE モデルの自動構築ずトレヌニング
  52. 60 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker フルマネヌゞド型: ワンクリックでモデル展開 自動スケヌリング 䜎レむテンシヌず高スルヌプット BYOL Python SDK ゚ンドポむントに耇数のモデルの展開
  53. 61 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Multi-Model Endpoint 単䞀の゚ンドポむントの裏に耇数のモデルを眮くこずができ、 動的にモデルを远加するこずも可胜 S3 model storage tokyo.tar.gz kanagawa.tar.gz osaka.tar.gz aichi.tar.gz S3://bucket/our-endpoint-models/ S3://bucket/our-endpoint-models Load
  54. 62 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Model Monitor 皌働䞭モデルの継続モニタリング 自動デヌタ収集 デヌタぱンドポむントから自動収集 継続モニタリング 監芖スケゞュヌルを定矩し、事前に定矩された ベヌスラむンに察する品質の倉化を怜出 ルヌルによる柔軟性 組み蟌みルヌルを䜿甚しおデヌタドリフトを怜出するか、 カスタム分析のための独自ルヌルを蚘述 芖芚的デヌタ分析 SageMaker Studio 内の監芖結果、デヌタ統蚈、 違反レポヌトを参照 CloudWatch統合 Amazon CloudWatch アラヌムに基づいお曎新凊理を自動化
  55. 63 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | モデルドリフト怜出埌、察策を講じるために Amazon SageMaker Model Monitor を䜿甚
  56. 64 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Neo 1回のトレヌニングで、どこでも2倍のパフォヌマンスで実行 オヌプン゜ヌスの Neo-AI デ バむスランタむム およびコンパむラ 元のフレヌムワヌクの 1/10のサむズ 幅広いハヌドりェア サポヌト Neo 幅広いフレヌムワヌク サポヌト
  57. 66 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 66 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | 90% 掚論 (予枬) 10% トレヌニング 掚論の 耇雑さずコスト
  58. 67 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 費甚察効果の高い掚論のための幅広いオプション ネットワヌク接続 掚論アクセラレヌタ eia1.medium 䞭芏暡モデル、䜎レむテンシ 蚱容限界のある予算 Elastic Inference M5 倧型モデル、高スルヌプット、 CUDAぞ䜎レむテンシアクセス GPU むンスタンス P3 G4 小型モデル、 䜎スルヌプット CPU むンスタンス C5 Inf1: 高スルヌプット、高パフォヌマンス、 クラりドコスト抑制 カスタムチップ Inf1 G5
  59. 68 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Inf1 むンスタンスは AWS に よっおれロから構築され、 高性胜で費甚察効果の高い 掚論を提䟛 https://aws.amazon.com/ec2/instance-types/inf1 ハむパフォヌマンス 䜎コスト AWS専甚第2䞖代むンテル Xeon Scalable Processor AWS Nitro AWS Inferentia 掚論の カスタムビルド 100Gbps ネットワヌク
  60. 69 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS Inferentia • AWS による独自蚭蚈の掚論甚プロセッサ • 4 Neuron コア / チップ • チップ圓たり最倧128 TOPS • (2,000 TOPS @inf1.24xlarge) • 2ステヌゞ メモリ階局 • 倧容量オンチップ キャッシュず DRAM メモリ • FP16, BF16, INT8 デヌタタむプをサポヌト • FP32 で構築された孊習モデルを BF16 で実行可胜 • 高速チップ間通信 Inferentia Neuron コア cache Neuron コア cache メモリ Neuron コア cache Neuron コア cache メモリ メモリ メモリ
  61. 70 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Neuronコア パむプラむン - 倧芏暡モデルを䜎遅延で掚論 • 倧芏暡モデルを䜎遅延で掚論 • Neuron コア間・チップ間をパむプラむンモヌドで接続するこずにより、 倧芏暡モデルを各オンチップキャッシュメモリ䞊に展開し、 高スルヌプット・䜎レむテンシを実珟 CACHE Memory CACHE Memory CACHE Memory CACHE Memory Neuron コア パむプラむン
  62. © 2020, Amazon Web Services, Inc. or its Affiliates. AWS

    Neuron SDK https://github.com/aws/aws-neuron-sdk コンパむル Neuron コンパむラ (NCC) NEFF を出⌒ Neuron バむナリ (NEFF) デプロむ Neuron ランタむム (NRT) プロファむル Neuron ツヌル C:\>code --version 1.1.1
  63. 73 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon Augmented AI (A2I) 掚論結果の ヒュヌマンレビュヌに必芁な ワヌクフロヌを容易に構築 簡単に ヒュヌマンレビュヌワヌクフロヌを実装 構築枈みのワヌクフロヌず UI により 垂堎投入たでの時間を短瞮 耇数の芁員オプション カスタム ML モデルずの統合 事前に構築されたアルゎリズムで粟床を向䞊
  64. 74 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon Augmented AI の仕組み ヒュヌマンレビュヌに 信頌性の䜎い予枬倀を送信 4 A2I の回答連結アルゎリズム を䜿甚したレビュヌ統合 5 クラむアントアプリケヌションに 盎ぐに信頌性の高い予枬倀を返す 3 AWS AI サヌビスたたは カスタム ML モデルが予枬 2 クラむアント アプリケヌションが 入力デヌタ送信 1 結果はお客様 の S3 に保存 6 Client application
  65. 75 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker を始めおみたしょう 事䟋 https://github.com/awslabs/ amazon-sagemaker-examples 開発者ガむド https://docs.aws.amazon.com/ sagemaker/latest/dg/whatis.html SDKドキュメント https://sagemaker.readthedocs. io/en/stable/overview.html
  66. 76 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 76 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | Amazon SageMaker の䜿い方
  67. 77 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | SageMaker Studio (IDE) ぞは SSO/IAM でログむン
  68. 78 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Notebook むンスタンス (Jupyter Notebook/Lab) も䜿えたす • むンスタンスタむプを遞んで立ち䞊げ • フレヌムワヌクがプリむンストヌル枈のカヌネル • ノヌトブックむンスタンス䜜成・起動時のスクリプト実行や git 連携 • https://github.com/aws-sam’ples/amazon-sagemaker-notebook-instance-lifecycle-config-samples • https://aws.amazon.com/jp/blogs/news/amazon-sagemaker-notebooks-now-support-git-integration-for- increased-persistence-collaboration-and-reproducibility/
  69. 79 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Jupyter Notebook/Lab Amazon S3 The Jupyter Trademark is registered with the U.S. Patent & Trademark Office. 開発 デヌタは予め Amazon S3 にアップロヌド。 やりやすい方法で: • SageMaker Python SDK で簡単に • sagemaker_session.upload_data( path='data', key_prefix='data/DEMO') • AWS CLI や AWS SDK (Python だず boto3) などでも • aws s3 sync <source> <dest> • GUI (マネヌゞメントコン゜ヌル) からでも
  70. 80 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker 開発 Jupyter Notebook/Lab Amazon S3 The Jupyter Trademark is registered with the U.S. Patent & Trademark Office.
  71. 81 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker 開発 Jupyter Notebook/Lab Amazon S3 å­Šç¿’ Amazon EC2 P3 Instances Amazon ECR The Jupyter Trademark is registered with the U.S. Patent & Trademark Office. 予め甚意されおいる ビルド枈みの Docker むメヌゞ or BYOC
  72. 82 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker 開発 å­Šç¿’ Amazon EC2 P3 Instances Jupyter Notebook/Lab Amazon S3 The Jupyter Trademark is registered with the U.S. Patent & Trademark Office. トレヌニングゞョブのメリット: • API 経由で孊習甚むンスタン スを起動、 孊習が完了するず自動停止 • 高性胜なむンスタンスを 秒課金で、簡単にコスト削枛 • 指定した数のむンスタンスを 同時起動、分散孊習も容易
  73. 83 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker 開発 å­Šç¿’ Amazon EC2 P3 Instances Jupyter Notebook/Lab Amazon S3 The Jupyter Trademark is registered with the U.S. Patent & Trademark Office.
  74. 84 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker 開発 å­Šç¿’ 掚論 Amazon EC2 P3 Instances Jupyter Notebook/Lab Endpoint/ Batch transform Amazon S3 Amazon ECR The Jupyter Trademark is registered with the U.S. Patent & Trademark Office.
  75. 86 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | ワヌクフロヌ構築を助けるツヌル • SageMaker Python SDK (v2) • https://github.com/aws/sagemaker-python-sdk/ • AWS Step Functions Data Science SDK • https://github.com/aws/aws-step-functions-data-science-sdk-python • Docker コンテナによる環境統䞀 • ビルド枈みコンテナ (察応フレヌムワヌクのバヌゞョン) は䞊蚘 URL の README 参照 • Git リポゞトリずの連携
  76. 91 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | SageMaker Python SDK (v2) https://sagemaker.readthedocs.io/en/stable/v2.html import sagemaker from sagemaker.pytorch import PyTorch # 各フレヌムワヌクに察応した Estimator クラス estimator = PyTorch("train.py", # トレヌニングスクリプトなどを指定しお初期化 role=sagemaker.get_execution_role(), instance_count=1, instance_type="ml.p3.2xlarge", framework_version="1.6.0", py_version="py3") estimator.fit("s3://mybucket/data/train") # fit でトレヌニング predictor = estimator.deploy(initial_instance_count=2, # 2以䞊にするず Multi-AZ instance_type="ml.m5.xlarge") # deploy で゚ンドポむント䜜成 predictor.predict(data) # 掚論の実行 少し呜名芏則が 倉わっおいたす
  77. 92 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 「コンテナ」による環境の統⌀化 CUDA, cuDNN トレヌニングスクリプト train.py Deep Learning Framework スクリプトの実行に必芁なものを コヌドで蚘述し䞀箇所にたずめる Docker image
  78. 93 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | コヌドの曞き換え䟋: train.py (Script Mode, File Mode) import argparse if __name__ == '__main__’: parser = argparse.ArgumentParser() # hyperparameters parser.add_argument('--epochs', type=int, default=10) # input data and model directories parser.add_argument('--train', type=str, default=os.environ['SM_CHANNEL_TRAIN']) parser.add_argument('--test', type=str, default=os.environ['SM_CHANNEL_TEST']) parser.add_argument('--model-dir', type=str, default=os.environ['SM_MODEL_DIR']) args, _ = parser.parse_known_args() 
 (以䞋省略) コンテナ内のパス (環境倉数の䞭身): /opt/ml/input/data/train /opt/ml/input/data/test /opt/ml/model コマンド ラむン匕数・ 環境倉数 から取埗 Script Mode では普通の Python スクリプトずしお実行される。 はじめに環境倉数からデヌタ・モデル入出力のパスを取埗しお、 そこを読み曞きするように train.py を曞く。掚論甚にモデルを読み蟌む。
  79. 94 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | トレヌニングデヌタぞのアクセス https://docs.aws.amazon.com/sagemaker/latest/dg/model-access-training-data.html • FILE モヌド • デヌタを Docker コンテナのロヌカルディレクトリにダりンロヌドしおから孊習 • Amazon S3, Amazon EFS, Amazon FSx for Lustre • FAST FILE モヌド • コヌドの倉曎なしに S3 からストリヌミング、ファむルシステムぞのアクセスも提䟛 • シヌケンシャルな読み蟌みのずきにベストパフォヌマンス • S3 の指定した prefix 以䞋にファむルが少なければ高速 • 䟋えば、K-Means クラスタリングモデル甚の100GB のデヌタセットは、 ファむルモヌドで 28 分かかったのに察し、高速ファむルモヌドでは玄 5 分 (82% æž›) • PIPE モヌド • S3 からストリヌミングでダりンロヌドしながら非同期に孊習 • RecordIO, TFRecord フォヌマットが利甚可胜な TensorFlow, MXNet に察応
  80. 95 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Git リポゞトリずの統合 • リポゞトリを指定し盎接トレヌニング実行も可胜 • ブログ「Amazon SageMaker Python SDK で Git 統合を利甚可胜」 git_config = {'repo': 'https://github.com/awslabs/amazon-sagemaker-examples.git’, 'branch': 'training-scripts’} estimator = TensorFlow(entry_point='train.py', source_dir='char-rnn-tensorflow', git_config=git_config, train_instance_type=train_instance_type, train_instance_count=1, role=sagemaker.get_execution_role(), framework_version=‘1.14', py_version='py3', script_mode=True) • レガシヌ Notebook むンスタンス • 立ち䞊げ時にリポゞトリ玐付けが可胜 • Public リポゞトリを clone • Private リポゞトリの認蚌情報を AWS Secrets Manager に保管しおリポゞトリ登録 • Jupyter Notebook の diff を取れる ”SageMaker Notebooks now support diffing“
  81. 96 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 継続的な機械孊習のワヌクフロヌず MLOps
  82. 102 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Pipelines 機械孊習の CI/CD をおこなうマネヌゞドサヌビス ワヌクフロヌの 各ステップを 䞭心的に管理 事前に甚意された テンプレヌト ワヌクフロヌの 再実行ず共有 ワヌクフロヌを 芖芚化
  83. 103 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Pipelines 機械孊習の CI/CD 数行曞くだけで、自動化された機械孊習ワヌクフロヌを構築 数ヶ月かかるコヌディング時間を数時間に削枛 機械孊習の開発を加速 モデル成果物を自動でトラッキングし手動管理の手間を削枛 モデル成果物を自動的にトラッキング ビルトむンのテンプレヌトで CI/CD パむプラむンを蚭定し 機械孊習モデルをスケヌラブルにデプロむ 本番環境における数千ものモデルにスケヌル
  84. 104 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | Amazon SageMaker Pipelines 抂芁 Amazon SageMaker Pipelines フルマネヌゞドな 機械孊習ワヌクフロヌを構築 Model registry モデルバヌゞョン、 メトリクス、承認、 モデルデプロむのカタログ化 Real-time inference Batch scoring Input data Model drift Prepare or transform Explain Train Validate CI/CD ずモデル系列远跡で ML Ops の自動化
  85. 105 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | How Amazon SageMaker Pipelines works パむプラむン実行の開始: • 手動 • デヌタアップロヌド時の CloudWatch むベント • コヌド check-in (git push) Acceptable accuracy Non-acceptable accuracy Get input data Process data Train model Validation Deploy model Alert and stop
  86. 106 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | パむプラむン実行の詳现ずリアルタむムのメトリクス • 完了したステップの確認ず 実行䞭のステップの モニタリング • 出力メトリクスずログを確認 • 各ステップのパラメヌタを モニタヌ、倉曎、管理
  87. 107 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | モデルのプロダクションデプロむを承認
  88. 108 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | 他にもある AWS のワヌクフロヌ管理ツヌル • サヌバヌレスオヌケストレヌション サヌビス • 分散アプリケヌション・マむクロサヌ ビスの党䜓を「ステヌトマシン」ず呌 ばれる仕組みでオヌケストレヌト • 定矩したステヌトマシンは AWS コン ゜ヌルから「ワヌクフロヌ」ずいう圢 匏で可芖化 • ステヌトマシンの各ステップの実⟏履 歎をログから远跡できる • Apache Airflow によるワヌクフロヌを構 築可胜なマネヌゞドサヌビス • ETLゞョブやデヌタパむプラむンを実⟏ するワヌクフロヌをマネヌゞド型で実⟏ 可胜。開発者がビゞネス䞊の課題解決に 泚⌒できるようにする • Airflowのメトリクスを CloudWatch メト リクスずしお扱い、ログを CloudWatch Logs に転送可胜 Amazon SageMaker Pipelines Amazon Managed Workflows for Apache Airflow (MWAA) AWS Step Functions w/Data Science SDK (Python) • 機械孊習の CI/CD を実珟する Amazon SageMaker の機胜 • 機械孊習ワヌクフロヌのデヌタ ロヌドや孊習凊理などの⌀連の凊 理ステップを任意のタむミングや 所定の時間に実⟏できる • 各ステップの凊理結果は SageMaker Experiments で蚘録さ れ、モデルの出来映えや孊習パラ メヌタなどを芖芚化できる
  89. 109 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS Step Functions • JSON ベヌスの蚀語でステヌトマシンを蚘述できるマネヌゞドサヌビス • AWS Step Functions Data Science SDK • AWS Lambda をはじめずした各サヌビスに察応 • CloudWatch Event でスケゞュヌル実行やむベントトリガヌが可胜 Start End Train Deploy Prepare data AWS Glue Amazon SageMaker Amazon SageMaker Amazon CloudWatch Events (Schedule / event trigger)
  90. 110 © 2020 Amazon Web Services, Inc. or its affiliates.

    All rights reserved | AWS Step Functions workflow 機械孊習パむプラむンの構築䟋 Test data Train data Data Scientists/ Developers Git webhook docker push Amazon SageMaker Processing Amazon S3 (data) Amazon SageMaker Training Job / HPO AWS CodeCommit or 3rd party Git repository Amazon S3 (raw data) Amazon Elastic Container Registry (ECR) AWS CodeBuild Endpoint Amazon SageMaker Batch Transform / Endpoint deploy Amazon S3 (trained model) git push
  91. Q&A

  92. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker JumpStart を䜿ったハンズオン
  93. • Managed Spot Training for XGBoost • Training and Hosting

    a PyTorch model in Amazon SageMaker 少々曞き換えが必芁です https://gist.github.com/hariby/4691d1c0563df0e5cffc089e7db862b2 Amazon SageMaker JumpStart を䜿ったハンズオン
  94. • SageMaker JumpStart の他のコンテンツを詊す • https://github.com/aws-samples/aws-ml-jp • https://github.com/aws/amazon-sagemaker-examples • サンプルが動かない堎合に考えられる原因

    SageMaker Studio ではなく、レガシヌ Notebook むンスタンス甚に䜜られおいる SageMaker Python SDK v1 を䜿っお曞かれおいる Next Step
  95. Thank you © 2021, Amazon Web Services, Inc. or its

    affiliates. All rights reserved. @_hariby