[レポート] API325 : Amazon SageMakerとAWS Step Functionsによる機械学習のワークフロー #reinvent

AWS re:Invent 2018 API325 - ML Workflows with Amazon SageMaker and AWS Step Functionsのセッションレポートです。
2018.12.03

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

AWS re:Invent 2018 API325 - ML Workflows with Amazon SageMaker and AWS Step Functionsのセッションレポートです。

以下、公式の概要です。

Learn how you can build, train, and deploy machine learning workflows for Amazon SageMaker on AWS Step Functions. Learn how to stitch together services, such as AWS Glue, with your Amazon SageMaker model training to build feature-rich machine learning applications, and you learn how to build serverless ML workflows with less code. Cox Automotive also shares how it combined Amazon SageMaker and Step Functions to improve collaboration between data scientists and software engineers. We also share some new features to build and manage ML workflows even faster.

スピーカーはPrincipal Engineer, AI Platforms の Tom Faulhaber さんと Sr. Product Manager, Amazon Web Services の Andy Katz さんと Solution Architect, Cox Automotive Inc. の Jeremy Irwin さんでした。

動画

スライド

レポート

機械学習のワークフローから始まり、機械学習のワークフローにおけるAmazon SageMakerとAWS Step Functionsについて説明した上で、実際の事例としてCox Automotiveでの適用事例の紹介でした。

アジェンダ

  • Build, train, and deploy machine learning models with Amazon SageMaker
  • Build serverless workflows with less code to write and maintain using AWS Step Functions
  • Learn how Cox Automotive combined SageMaker and Step Functions to improve collaboration between data scientists and software engineers
  • New features to build and manage ML workflows even faster

Build, train, and deploy machine learning models with Amazon SageMaker

  • 機械学習のライフサイクル
  • AWS上でのデータ管理
  • SageMakerを利用したモデルの構築と学習
  • SageMakerを利用したモデルのデプロイ
  • ステップ間のフローをどうするか?

Build serverless workflows with less code to write and maintain using AWS Step Functions

  • AWS Step Functionsの紹介
  • JSON形式のAmazon States Languageを利用する
  • 複数のコンピューターリソースを用いてタスクを実行する

Learn how Cox Automotive combined SageMaker and Step Functions to improve collaboration between data scientists and software engineers

  • Cox Automotive社のデータサイエンティストの要望
    • ちなみに、この後 Decision Science という単語が出てるるけど、社内でそう呼んでるからで意味は Data Scientist と同じ意味だよ。
  • デジタル広告のレコメンデーション:データサイエンティストとエンジニアの軋轢をどうやって減らすか
    • エンジニア側:どうやれば追加の作業なしにデプロイパイプラインにデータサイエンティストのモデルを組み込めるのか
    • データサイエンティスト側:どうすればエンジニアのデプロイスケジュールを待つことを避けられるのか
  • エンジニアリングとデータサイエンスは異なる
  • AWS Compute BlogのImplementing Serverless Manual Approval Steps in AWS Step Functions and Amazon API Gateway | AWS Compute Blogのエントリーが契機
  • 作成したSageMakerのモデルデプロイパイプラインとその解説。モデルのレビューリクエストメールを生成して、メール内で承認するか否認するかを選択できるようにした。
  • データサイエンティスト側がエンジニアリングについて学んだこと
  • エンジニアリング側がデータサイエンスについて学んだこと

New features to build and manage ML workflows even faster

  • まずは機械学習のワークフローの再確認
  • Step Functionsを利用した機械学習のワークフロー
  • 非同期ジョブはコードを書かずに管理する
  • ワークフローを単純化する
    • 魔法のARNを使ってAWS GlueのETLジョブをワークフローに追加する
    • 同様に魔法のARNを使ってAmazon SageMakerのトレーニングと変換ジョブをワークフローに追加する
  • AWS Cloud Developer KitがもうじきPythonをサポートする

「魔法のARN」とありますが、[神アップデート]Step Functionsが新たに8つのマネージドサービスと連携可能になりました! #reinvent | DevelopersIOの発表が翌日だったのでARNのみの紹介になっていたのだと予想されます。

最後に

機械学習の概要はしっていたのですが、SageMakerとStep Functionsは触ったことがなかったのでうまい組み合わせ方がわかってよかったです。これを機にSageMakerとStep Functionsも触っていければと考えています。