SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
How to break the Machine Learning
system barrier?
@hurutoriya
#MLCT 5 2018/07/13
Outline
● 機械学習システムバリアの破壊方法
● Better Machine Learning Workflow
$ whoami
● 上田隼也 :: @hurutoriya
● Machine Learning Engineer in Mercari, Inc.
● Machine Learning Casual Talks Co-Organizer
● https://shunyaueta.com/
機械学習システムバリアの破壊方法
● 機械学習システムを構築するために立ちはだかバリア
○ 継続的再学習 (Continuous Learning)
○ システムに必ずヒトが介在する (Human-in-the-loop)
○ データは不変の存在ではない (Data is mutable)
継続的なモデルの学習
● なぜ必要?
○ データは水物
○ 一度モデルを学習して終わりではない
○ 継続的なモデルの再学習は必須
柔軟なモデル設計
● 問題: 流通する商品から特定のn種類の商品を検出したい
○ Bad: (n+1)値分類によるアプローチ
○ Good: 2値分類モデルをn個用意する
■ 問題の切り分け
■ モデルのスイッチングが容易
■ タスク変更時にも柔軟性を持つ
Data Versioning
● 学習データのアノテーションにはヒトが介在
● 異変が起きる前提で考える
○ データのバージョン管理
■ AWS: S3 Versioning , GCP: GCS Versioning
○ 学習データも日付ごとに分割して管理
■ モデルの精度をモニタリング、低下した際に
学習データのロールバックが可能
余談: Annotation tips
● ちょっとした学習データ欲しい際に
Google Spread Sheetsを愛用
○ ImageURL()でCellの中に画像表示
○ 1時間で4000回くらいアノテーションができる
ImageURL()CDN URL Annoation
Metricsを誰でも見れる環境へ
● 従来: モデル推論結果をBQから叩いてSpreadSheetsで確認
● 現在: BIツールのlookerで確認できるように移行中
○ 利点
■ 閲覧のみ可能で編集不可
■ 誰でも気軽に閲覧可能
■ 属人性を排除できる
Machine Learning Workflow
● Cookiecutterによる標準化されたプロジェクトの生成
● Better Machine Learning Code by PeerReview
○ 2段階に分けてレビューを行う
■ Better Model (より良いモデルか?)
■ Better & Clean Code (より良いコードか?)
Cookiecutterによる標準化されたプロジェクトの生成
● CLIで機械学習のプロジェクトテンプレート作成
● CircleCIによる UnitTest, Lint を自動化
● make replication
○ モデル再学習
○ 精度可視化 (AUC など)
$ pip3 install cookiecutter
$ cookiecutter https://github.com/{mercari-ml-skeleton}
Making Pipeline, Not Imperative
Ref: mercari-solution
Making Pipeline, Not Imperative
Ref: mercari-solution
Unit Test for Machine Learning Code
● 想定していないデータによって即死するケース
○ NaN-Trap
● 沢山の罠が存在するが、ある程度はUnitTestで排除可能
● e.g. 文書の前処理が想定通り行われているか
assert "おお" == normalize("おお “)
assert “自分 は ペンパイナッポーアッポーペン"
== func(“自分はペンパイナッポーアッポーペン”)
問題を包括的に解決するための個人的な注目
● TFX: TensorFlow Extend
○ プロダクションレベルの信頼性とスケーラビリティを提供す
る
● Kubeflow
○ k8sベースの機械学習toolkit
Jupyter Hub, TF, TF Serving, Argo, Katib, ~Operator, etc.
Reference
★ Strategy
○ TFX: A TensorFlow-Based Production-Scale Machine Learning Platform
○ Applied Machine Learning at Facebook: A Datacenter Infrastructure Perspective
○ Introducing FBLearner Flow: Facebook’s AI backbone
○ Machine Learning in Uber's Data Science Platforms
○ Rules os ML: EN, JP
○ Machine Learning Glossary
○ CVPR 2018: Software Engineering in Computer Vision System
○ Machine Learning That Matters
○ TRAIN AI 2018- Building Software 2.0 Stack
★ Code & Tools
○ Mercari 1st winners solution
○ Cookiecutter Data Science
○ Kubeflow
Another Story

Más contenido relacionado

Más de Shunya Ueta

Más de Shunya Ueta (14)

Introducing "Challenges and research opportunities in eCommerce search and re...
Introducing "Challenges and research opportunities in eCommerce search and re...Introducing "Challenges and research opportunities in eCommerce search and re...
Introducing "Challenges and research opportunities in eCommerce search and re...
 
Auto Content Moderation in C2C e-Commerce at OpML20
Auto Content Moderation in C2C e-Commerce at OpML20Auto Content Moderation in C2C e-Commerce at OpML20
Auto Content Moderation in C2C e-Commerce at OpML20
 
How to evaluate & manage machine learning model #daft
How to evaluate & manage machine learning model  #daftHow to evaluate & manage machine learning model  #daft
How to evaluate & manage machine learning model #daft
 
Introduction to argo
Introduction to argoIntroduction to argo
Introduction to argo
 
Kubeflowで何ができて何ができないのか #DEvFest18
Kubeflowで何ができて何ができないのか #DEvFest18Kubeflowで何ができて何ができないのか #DEvFest18
Kubeflowで何ができて何ができないのか #DEvFest18
 
TFX: A tensor flow-based production-scale machine learning platform
TFX: A tensor flow-based production-scale machine learning platformTFX: A tensor flow-based production-scale machine learning platform
TFX: A tensor flow-based production-scale machine learning platform
 
Applied machine learning at facebook a datacenter infrastructure perspective...
Applied machine learning at facebook  a datacenter infrastructure perspective...Applied machine learning at facebook  a datacenter infrastructure perspective...
Applied machine learning at facebook a datacenter infrastructure perspective...
 
C-IMAGE: city cognitive mapping through geo-tagged photos 解説
C-IMAGE: city cognitive mapping through geo-tagged photos 解説C-IMAGE: city cognitive mapping through geo-tagged photos 解説
C-IMAGE: city cognitive mapping through geo-tagged photos 解説
 
Self-turning Spectral Clustering (NIPS2004)
Self-turning Spectral Clustering (NIPS2004)Self-turning Spectral Clustering (NIPS2004)
Self-turning Spectral Clustering (NIPS2004)
 
Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions (ICML2003)
Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions (ICML2003)Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions (ICML2003)
Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions (ICML2003)
 
Detecting Research Topics via the Correlation between Graphs and Texts
 Detecting Research Topics via the Correlation between Graphs and Texts Detecting Research Topics via the Correlation between Graphs and Texts
Detecting Research Topics via the Correlation between Graphs and Texts
 
Fast normalized cut with linear constraint (CVPR2009)
Fast normalized cut with linear constraint (CVPR2009)Fast normalized cut with linear constraint (CVPR2009)
Fast normalized cut with linear constraint (CVPR2009)
 
"Spectral graph reduction for efficient image and streaming video segmentatio...
"Spectral graph reduction for efficient image and streaming video segmentatio..."Spectral graph reduction for efficient image and streaming video segmentatio...
"Spectral graph reduction for efficient image and streaming video segmentatio...
 
コミュニティサイトを爆速で作成し、お手軽に運用する方法
コミュニティサイトを爆速で作成し、お手軽に運用する方法コミュニティサイトを爆速で作成し、お手軽に運用する方法
コミュニティサイトを爆速で作成し、お手軽に運用する方法
 

How to break the machine learning system barrier ?