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
Argo Workflow によるMLジョブ管理
Search
Livesense Inc.
PRO
March 27, 2019
Technology
2
780
Argo Workflow によるMLジョブ管理
MACHINE LEARNING Meetup KANSAI #4
2019/3/27
Livesense Inc.
PRO
March 27, 2019
Tweet
Share
More Decks by Livesense Inc.
See All by Livesense Inc.
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
210
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
0
890
26新卒_総合職採用_会社説明資料
livesense
PRO
0
3k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
1
11k
26新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
1
6.5k
中途セールス職_会社説明資料
livesense
PRO
0
170
EM候補者向け転職会議説明資料
livesense
PRO
0
73
コロナで失われたノベルティ作成ノウハウを復活させた話
livesense
PRO
0
190
転職会議でGPT-3を活用した企業口コミ要約機能をリリースした話
livesense
PRO
0
1.2k
Other Decks in Technology
See All in Technology
UI State設計とテスト方針
rmakiyama
4
940
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
160
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
1
5k
20240522 - 躍遷創作理念 @ PicCollage Workshop
dpys
0
310
いまからでも遅くないコンテナ座学
nomu
0
200
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
250
Unlearn Product Development - Unleashed Edition
lemiorhan
PRO
2
170
Qiita埋め込み用スライド
naoki_0531
0
5.5k
The future we create with our own MVV
matsukurou
0
1.5k
C++26 エラー性動作
faithandbrave
2
880
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
140
30分でわかるデータ分析者のためのディメンショナルモデリング #datatechjp / 20250120
kazaneya
PRO
16
4k
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
112
50k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Side Projects
sachag
452
42k
How to Ace a Technical Interview
jacobian
276
23k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Building Adaptive Systems
keathley
38
2.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
A better future with KSS
kneath
238
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Transcript
Argo Workflow ʹΑΔMLδϣϒཧ Shotaro Tanaka / @yubessy / Ϧϒηϯε (ژΦϑΟε)
MACHINE LEARNING Meetup KANSAI #4 LT
͜Εͷհ͠·͢
https://argoproj.github.io/
Կ͕Ͱ͖Δͷ͔ "Container native workflow engine for Kubernetes" • ෳͷίϯςφΛྻ/ฒྻ࣮ߦ͢ΔϫʔΫϑϩʔΛఆٛͰ͖Δ •
σʔλύΠϓϥΠϯ, CI/CD ͳͲͷར༻Λఆ • ৽όʔδϣϯͰ DAG αϙʔτ • Argo ϕʔεͷ༷ʑͳϓϩμΫτ • Argo CD: GitOps ʹΑΔ CD Λ࣮ݱ • Argo Event: ϫʔΫϑϩʔͷτϦΨ
apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: generateName: ml-workflow- spec: entrypoint: main
templates: - name: main steps: - - name: load-dataset template: load-dataset - - name: train-model-1 template: train-model arguments: parameters: [{name: model, value: model1}] - name: train-model-2 template: train-model arguments: parameters: [{name: model, value: model2}] ...
... - name: load-dataset container: image: postgres:latest command: [sh, -c]
args: ["psql db -c 'SELECT * FROM dataset' -A -F, > dataset.csv"] - name: train-model inputs: parameters: [{name: model}] container: image: train-model command: [sh -c] args: ["python train_model.py --model={{inputs.parameters.model}}"]
None
ͳͥ͏ͷ͔ ʮϞσϧ͕Ͱ͖ͨͷͰɺαΫοͱӡ༻ʹ͍ͤͨʯ • MLϞσϧͷ։ൃऀ • SQL Ͱσʔλऔಘ ʙ Ϟσϧ༧ଌΛϑΝΠϧʹग़ྗ •
Docker Ͱಈ͘Α͏ʹ͓ͯ͘͠ • MLγεςϜͷ։ൃऀ • DBIO Ϟσϧɾ༧ଌ݁ՌͷσϦόϦॲཧΛ࣮ • Argo Ͱͯ͢ΛΈ߹ΘͤͨϫʔΫϑϩʔΛ࡞Δ → ίϯςφ୯ҐͰׂ୲
ϦϒηϯεͰͷར༻ྫ • ग़ྗͷDBॻ͖ࠐΈॲཧͷ • Ϟσϧͷ Continuous Delivery • ฒߦॲཧ
ग़ྗͷDBॻ͖ࠐΈॲཧͷ • ٻਓαΠτͷݕࡧॱҐ੍ޚ༻༧ଌϞσϧ • όονͰֶशɾ༧ଌ͠ग़ྗΛDBʹॻ͖ࠐΈ • Ϟσϧͷ։ൃऀCSVग़ྗ·Ͱ࣮ͯ͠ Docker Խ͓ͯ͘͠ •
ॻ͖ࠐΈॲཧΫϨσϯγϟϧཧγεςϜͷ։ൃऀ͕࣮ steps: - - name: train-model # MLϞσϧͷ։ൃऀ͕࣮ - - name: predict-rates # MLϞσϧͷ։ൃऀ͕࣮ (ग़ྗCSV) - - name: import-to-db # MLγεςϜͷ։ൃऀ͕࣮ # ※ग़ྗϑΝΠϧڞ༗ϘϦϡʔϜͰड͚͠
Ϟσϧͷ Continuous Delivery • Ӧۀઓུɾࠂग़ߘΛఆͨ͠ٻਓޮՌਪఆϞσϧ • ϚʔέςΟϯά୲ऀ͚ͷϏϡʔϫΛ R-Shiny Ͱ։ൃɾӡ༻ •
ਪఆॲཧ͕ྃ͢ΔͨͼʹϏϡʔϫΛσϓϩΠͯ͠ϞσϧΛߋ৽ steps: - - name: estimate # ਪఆॲཧ - - name: upload-model # ࡞͞ΕͨϞσϧΛετϨʔδʹอଘ - - name: update-viewer # ϏϡʔϫΛσϓϩΠ͢͠
Ϟσϧͷ Continuous Delivery (ଓ͖) • Ϗϡʔϫಉ͡ Kubernetes ΫϥελͰ Deployment ͱ͍ͯಈ͍͍ͯΔ
• kubectl set env Ͱ Deployment Λߋ৽͢Δ͜ͱͰ৽͍͠ϞσϧΛಡΈࠐΉ • Rolling Update ʹΑΓμϯλΠϜແ͠ͷϞσϧߋ৽Մೳ - name: update-viewer container: image: kubectl command: ["sh", "-c"] args: ["kubectl set env deployment/viewer-app MODEL={{workflow.parameters.model}}"]
ฒߦॲཧ • WebςετͷଟόϯσΟοτ࠷దԽͷॏΈߋ৽δϣϒ • ෳͷςετ͕͓ͬͯΓɺ֤ςετͷਪఆॲཧฒߦ࣮ߦ͍ͨ͠ steps: - - name: list-experiments
# ਪఆॲཧ͕ඞཁͳςετΛϦετΞοϓ - - name: calc-weights # ͜ΕΛϦετΞοϓ͞Εͨςετͷ͚ͩฒߦ࣮ߦ͢Δ # ग़ྗύϥϝʔλͷϦετΛ͢ͱͦͷ͚ͩίϯςφ্ཱ͕͕ͪΔ # Ϧετ [{"experimentId": 1}, {"experimentId": 2}] ͷΑ͏ͳ JSON withParams: "{{steps.list-experiments.outputs.parameters.experiments}}" # Ϧετͷ֤ΞΠςϜ͔ΒύϥϝʔλΛऔΓग़ͯ͢͠ arguments: parameters: [{name: experimentId, value: "{{item.experimentId}}"}]
ฒߦॲཧ (ଓ͖) templates: - name: list-experiments container: ... outputs: parameters:
- name: experiments # ग़ྗύϥϝʔλͷϦετΛϑΝΠϧࢦఆ valueFrom: {path: /output/experiments.json} - name: calc-weights container: ... inputs: parameters: # ύϥϝʔλΛೖྗͱͯ͠ड͚औΔ - name: experimentId
None
·ͱΊ • ෳίϯςφ͔ΒͳΔϫʔΫϑϩʔΛ؆୯ʹΊΔ • ͭͬͨ͘MLϞσϧΛ͘͢ӡ༻͍ͨ͠ͱ͖ʹศར هࣄ͋Γ·͢: Argo ʹΑΔίϯςφωΠςΟϒͳσʔλύΠϓϥΠϯͷϫʔΫϑϩʔཧ