14 Data Science Team Data Engineer Team Service Engineer Team 学習/予測コード納品 予測結果ファイル連携 Data Science Team Data Engineer Team Service Engineer Team ● エンジニアのリソース上限が施 策ごとの開発ボトルネック ● プロダクトの機能開発・ 自動化・信頼性向上に 開発リソースを十分に割けない ● エンジニアのリソース上限が 施策ごとの開発ボトルネック ● プロダクトの機能開発・ 自動化・信頼性向上に 開発リソースを十分に割けない
15 結論:セルフサービス型のデータプロダクトを提供 Data Science Team Data Engineer Team Service Engineer Team Push/PR CI/CD Job API CI/CD ※ Job 基盤については以下の CNDT2021 の資料を御覧ください https://event.cloudnativedays.jp/cndt2021/talks/1212 Model Output (ファイル連携パターンも対応)
● 複数の KeyValue API や Prediction API を呼び出したり外部サービス 連携などを任意の Handler として記述できる。 ● Prediction API と同じく、任意の Handler 処理を書いたコードを Push 22 Functions (UX) ユースケース KeyValue API ① ユーザー特徴量 API KeyValue API ② アイテム特徴量 API Prediction API ① マッチングスコア予測 API Functions 外部サービス
25 Route の存在意義 Service Engineer Team model1.example.com model2.example.com ● API の Interface は同じなのに Service Engineer Team は 呼び出し先変更をする 開発が必要 ● 真に Data Science Team 主導で A/B テストをするなら、最初に API の仕様を決めてしまい モデルのアルゴリズムや パラメータ変更にサービス担当の エンジニアの工数を使わないのが 理想 Data Science Team
26 Route の存在意義 mlops-community-model1 mlops-community-model2 Route mlops-community.example..com Service Engineer Team Data Science Team ● 呼び出し先固定で中のロジックを変えることで Service Engineer Team の工数はゼロ →Blue/Green Deployment や Canary Release の考え方を適用 ● Data Science Team が自由にリリースを調整できるような設計
29 Kubernetes cluster istio-system namespace Cloud Load Balancing istio-ingressgateway Pod Team A Team B Istio Network Endpoint Group (NEG) knile-system namespace ※ knile は本資料で紹介している社内プラットフォーム名称です api-gateway Pod Team A namespace Team B namespace KeyValue 1 CustomResource KeyValue 2 CustomResource Functions 1 CustomResource KeyValue 1 CustomResource Prediction 1 CustomResource Route 1 CustomResource Route 1 CustomResource Logging Sink BigQuery Cloud Logging Console Team A Repo Team B Repo Team A Dashboard Team B Dashboard
30 Kubernetes cluster istio-system namespace Cloud Load Balancing istio-ingressgateway Pod Team A Team B Istio Network Endpoint Group (NEG) knile-system namespace ※ knile は本資料で紹介している社内プラットフォーム名称です api-gateway Pod Team A namespace Team B namespace KeyValue 1 CustomResource KeyValue 2 CustomResource Functions 1 CustomResource KeyValue 1 CustomResource Prediction 1 CustomResource Route 1 CustomResource Route 1 CustomResource Logging Sink BigQuery Cloud Logging Console Team A Repo Team B Repo Team A Dashboard Team B Dashboard
31 リポジトリ+インフラ環境の自動発行 Data Engineer Team Team A Resources Kubernetes Team A BigQuery Team A Cloud Storage Team B Resources Kubernetes Team B BigQuery Team B Cloud Storage ● チームごとに CI/CD を整備した状態の専用 Repo や GCP/k8s Resource、Datadog Dashboard を提供 ● これらの生成は Data Engineer Team がコードで集約管理 Infra Repo
32 Kubernetes cluster istio-system namespace Cloud Load Balancing istio-ingressgateway Pod Team A Team B Istio Network Endpoint Group (NEG) knile-system namespace ※ knile は本資料で紹介している社内プラットフォーム名称です api-gateway Pod Team A namespace Team B namespace KeyValue 1 CustomResource KeyValue 2 CustomResource Functions 1 CustomResource KeyValue 1 CustomResource Prediction 1 CustomResource Route 1 CustomResource Route 1 CustomResource Logging Sink BigQuery Cloud Logging Console Team A Repo Team B Repo Team A Dashboard Team B Dashboard
38 Kubernetes cluster istio-system namespace Cloud Load Balancing istio-ingressgateway Pod Team A Team B Istio Network Endpoint Group (NEG) knile-system namespace ※ knile は本資料で紹介している社内プラットフォーム名称です api-gateway Pod Team A namespace Team B namespace KeyValue 1 CustomResource KeyValue 2 CustomResource Functions 1 CustomResource KeyValue 1 CustomResource Prediction 1 CustomResource Route 1 CustomResource Route 1 CustomResource Logging Sink BigQuery Cloud Logging Console Team A Repo Team B Repo Team A Dashboard Team B Dashboard
● ちょうどいいイラスト ● Icons made by https://www.freepik.com from www.flaticon.com ● Updated 9/2021 Google Cloud Official Icons and Solution Architectures ● pandas - Python Data Analysis Library ● Go's New Brand ● The Python Logo ● Kubernetes icons ● icono-k8s-0.3 ● https://www.datadoghq.com/ja/about/resources/ ● The Python Logo アイコン・イラスト参照先 48