Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mercari ML Platform
Search
Hirofumi Nakagawa/中河 宏文
November 02, 2018
Technology
1
17k
Mercari ML Platform
Hirofumi Nakagawa/中河 宏文
November 02, 2018
Tweet
Share
More Decks by Hirofumi Nakagawa/中河 宏文
See All by Hirofumi Nakagawa/中河 宏文
IoTデバイスでMLモデルを動かす技術
hnakagawa
0
150
Kanazawa_AI.pdf
hnakagawa
0
160
メルカリ写真検索における Amazon EKS の活用事例と プロダクトにおけるEdgeAI technologyの展望
hnakagawa
5
8.8k
メルカリの写真検索を支えるバックエンド CCSE 2019 version
hnakagawa
0
290
メルカリ写真検索における Amazon EKS の活用事例
hnakagawa
6
29k
メルカリの写真検索を支えるバックエンド
hnakagawa
1
1.1k
mlct.pdf
hnakagawa
2
2k
機械学習によるマーケット健全化施策を支える技術
hnakagawa
0
220
メルカリのマーケット健全化施策を支えるML基盤
hnakagawa
10
8.9k
Other Decks in Technology
See All in Technology
急成長する企業で作った、エンジニアが輝ける制度/ 20250214 Rinto Ikenoue
shift_evolve
3
1.3k
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
13
3.5k
人はなぜISUCONに夢中になるのか
kakehashi
PRO
6
1.7k
2025-02-21 ゆるSRE勉強会 Enhancing SRE Using AI
yoshiiryo1
1
360
データの品質が低いと何が困るのか
kzykmyzw
6
1.1k
(機械学習システムでも) SLO から始める信頼性構築 - ゆる SRE#9 2025/02/21
daigo0927
0
120
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
2
1.5k
速くて安いWebサイトを作る
nishiharatsubasa
10
13k
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
3
1k
飲食店予約台帳を支えるインタラクティブ UI 設計と実装
siropaca
7
1.8k
2/18/25: Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
0
120
エンジニアのためのドキュメント力基礎講座〜構造化思考から始めよう〜(2025/02/15jbug広島#15発表資料)
yasuoyasuo
17
6.8k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Code Reviewing Like a Champion
maltzj
521
39k
GitHub's CSS Performance
jonrohan
1030
460k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Transcript
Mercari ML Platform
自己紹介 • Hirofumi Nakagawa(hnakagawa) • 2017年7月入社 • 所属はSRE • デバイスドライバ開発からフロントエ
ンド開発までやる何でも屋 • NOT MLエンジニア
Kubernetes CLI Image builder Cluster Pipeline Engine Dashboard Metrics Runner
Component Mercari ML Component ML platform architecture
Kubernetes CLI Image builder Cluster Pipeline Engine Dashboard Metrics Runner
Component Mercari ML Component
Container imageを自動でbuild。利用者がDockerfileを 書く必要は極力無いようにしてある Cluster Pipeline Engine CLI/Image builder Metrics Clusterリソースを管理し、container化されたData
Pipelineを実行する Prometheus使用している。ML modelに関するmetrics を取得
Kubernetes CLI Image builder Cluster Pipeline Engine Dashboard Metrics Runner
Component Mercari ML Component
前処理や分類器をContainer Pipelineで実行できるよう にコンポーネント化したもの Runner ML Component Mercari ML Component Training/Serving環境でcluster環境とlocal環境の差を
埋める データ・ソースやitem分類等、社内利用に特化したコン ポーネント
Container Based Pipeline
DataSource Image Text Preprocessing Image PV Picture Preprocessing Image PV
PV Estimator Image 全ての出力はPVに保存されキャッ シュとしても利用できる
Model Training & Serving Workflow
CI Training Cluster Job ・・・ Model Repository Job Job Serving
Cluster REST API TF Serving Faiss ・・・ 全てのModelが version管理 & image化されている
Serving Architecture
Mercari API Flask SK Model SK Model SK Model TensorFlow
Serving TF Model TF Model TF Model Virtual Service Basic serving API architecture
Streaming serving API architecture Flask SK Model SK Model SK
Model TensorFlow Serving TF Model TF Model TF Model Virtual Service Proxy
A/B Test Architecture
Model Service A Virtual Service Model Service B Mercari API
90% 10% Model API is activated by Istio
Common Problems of Model Serving
Huge model file vs container image • 巨大なMLモデルファイルをimageに含めるか否か • 含めないのであれば何処に配置するのか
• ポータビリティとロード時間のトレードオフ
Effective memory usage • 数GB程度のメモリを使用するのは普通 • プロセス毎にモデルをロードする必要がある環境は辛い • Copy on
Write(CoW)を利かす工夫が必要
In Progress
モデル評価と ReTrainingの自動化 モデル生成の 自動化 本番環境への自動 Deploy Architecture searchやHyper parameter optimization
によって簡単なモデル生成を自動化・簡素化 生成されたモデルを本番環境へ自動Deployし、最も良 いモデルが自動選択される 高度な自動化 運用中のモデルの評価/可視化、Re-Trainingを高度化・ 自動化する
ML Continuous Deployment Deploy Monitoring Evaluation Hyper parameter optimization Re-Training
リリース後も 精度監視・Hyper parameterチューニング・Re-training・Deployを自 動で行う
AutoFlow Feature Extraction Components Concatenation Components Classification Components Model Builder
Component Repository
In Future
Edge Device Democratization of AI Further Automation Future Plans
Edge Device • TensorFlow LiteやCore ML等Edgeサイドでpredictionを行える環 境が整ってきた • EdgeでのpredictionはUX上大きなメリットがあると考えている •
調査・研究を進めているので今後に乞うご期待?
Democratization of AI • 多くのモデルが求められている • MLエンジニア以外もモデルを作れるようにする • DataPlatformと合せて環境を整備する必要
Further Automation • 近い将来、数千〜のモデル運用を行う必要がある • さらなる高度な自動化が不可欠
None