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
機械学習によるマーケット健全化施策を支える技術
Search
Hirofumi Nakagawa/中河 宏文
May 23, 2018
Programming
0
210
機械学習によるマーケット健全化施策を支える技術
Hirofumi Nakagawa/中河 宏文
May 23, 2018
Tweet
Share
More Decks by Hirofumi Nakagawa/中河 宏文
See All by Hirofumi Nakagawa/中河 宏文
IoTデバイスでMLモデルを動かす技術
hnakagawa
0
140
Kanazawa_AI.pdf
hnakagawa
0
160
メルカリ写真検索における Amazon EKS の活用事例と プロダクトにおけるEdgeAI technologyの展望
hnakagawa
5
8.7k
メルカリの写真検索を支えるバックエンド CCSE 2019 version
hnakagawa
0
260
メルカリ写真検索における Amazon EKS の活用事例
hnakagawa
6
29k
メルカリの写真検索を支えるバックエンド
hnakagawa
1
1.1k
Mercari ML Platform
hnakagawa
1
17k
mlct.pdf
hnakagawa
2
2k
メルカリのマーケット健全化施策を支えるML基盤
hnakagawa
10
8.9k
Other Decks in Programming
See All in Programming
Golang と Erlang
taiyow
8
1.8k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
340
gopls を改造したら開発生産性が高まった
satorunooshie
8
220
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.4k
rtcamp 10 (vk-illuminati)
yumcyawiz
1
220
Honoの来た道とこれから
yusukebe
18
2.9k
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
140
Tuning GraphQL on Rails
pyama86
2
690
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
130
僕がつくった48個のWebサービス達
yusukebe
17
16k
Synchronizationを支える技術
s_shimotori
1
140
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
350
Featured
See All Featured
Optimizing for Happiness
mojombo
376
69k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
59k
Speed Design
sergeychernyshev
24
560
How GitHub (no longer) Works
holman
311
140k
Why Our Code Smells
bkeepers
PRO
334
57k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
660
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The Invisible Side of Design
smashingmag
297
50k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Transcript
ػցֶशʹΑΔϚʔέοτ ݈શԽࢪࡦΛࢧ͑Δٕज़ Mercari Server Side Tech Talk Vol.2 ʙCREφΠτʙ
hnakagawa
ࣗݾհ • Hirofumi Nakagawa (hnakagawa) • 20177݄ೖࣾ • ॴଐSRE •
σόΠευϥΠό։ൃ͔Βϑϩϯ τΤϯυ։ൃ·ͰΔԿͰ • NOT MLΤϯδχΞ • https://github.com/hnakagawa
͓ࣄ • ML Platform։ൃ • MLΤϯδχΞͱSREͷεΩϧΪϟοϓΛຒΊ Δ • ML Reliability,
SysML?, MLOps? • SREͷཱ͔ΒCREνʔϜΛॿ͚Δ
ML Platform • ͷML Platform • kubernetesϕʔε • ϩʔΧϧڥͱΫϥελڥͷ ࠩΛநԽ͢Δ
• ศརAPI܈ • طଘͷML FrameworkΛ༻͠ ؆୯ʹTraining/ServingΛߦ͏ ڥΛఏڙ
ͦͷ͏ͪOSSͰެ։༧ఆ(ଟ
ࠓͷAgenda ϦΞϧλΠϜࢹγεςϜ
ϦΞϧλΠϜࢹγεςϜ • ௨শ Lovemachine • ML Platform্ʹ࣮͞Ε͍ͯΔ .-1MBUGPSN USBJOJOHDMVTUFS -PWFNBDIJOF
($4 GKE PubSub .-1MBUGPSN TFSWJOHDMVTUFS -PWFNBDIJOF
ML ModelͷServing….?
Model Serving APIͷߏྫ 5FOTPS'MPX 4FSWJOH 5' .PEFM 5' .PEFM 'MBTL
4, .PEFM 4, .PEFM 4, .PEFM gRPC .FSDBSJ"1* REST FlaskͰલॲཧΛߦ͍ ཪͷTensorFlow Servingʹ͍͛ͯΔ
Model Serving API Streaming ver ͷߏྫ 5FOTPS'MPX 4FSWJOH 5' .PEFM
5' .PEFM .-1MBUGPSN 'SBNFXPSL PS "QBDIF#FBN 4, .PEFM 4, .PEFM 4, .PEFM gRPC PubSub
TensorFlow Serving • TensorFlow project͕ఏڙͯ͠ ͍ΔServingڥ • PythonॲཧܥΛհͣ͞ʹTFͷ modelΛservingͰ͖Δ •
ඪ४ͷ࣮ͰgRPCͰAPIΛ ఏڙ
ModelͱίϯςφɾΠϝʔδ • ڊେͳML ModelΛίϯςφɾΠϝʔδʹؚΊ Δ͔൱͔ • ؚΊͳ͍ͷͰ͋ΕԿॲʹஔ͢Δ͔ • ϙʔλϏϦςΟੑͱϩʔυ࣌ؒͷτϨʔυΦϑ •
ྑ͍ΞΠσΟΞ͕͋Εڭ͑ͯԼ͍͞…
௨ৗͷAPIͱҧ͏ • ѻ͏ϦιʔεɺModelαΠζ͕େ͖͘ͳΔ ߹͕ଟ͍(ඦMBʙGB) • CPUɾϝϞϦϦιʔεͷফඅ͕ܹ͍͠ • ߹ʹΑͬͯGPU͏
ϝϞϦফඅ • LovemachineͷPython࣮෦࣮ߦ࣌ʹ 2GBϝϞϦΛফඅ͢Δˠࠓޙ͞Βʹ૿͑Δ༧ ఆ͋Δ • Scikit-learnͰهड़͞ΕͨTF-IDFͷલॲཧ෦ ͕େ͖͘ͳΔࣄ͕ଟ͍
Pythonͱฒྻੑ • વThread͕͑ͳ͍(GILͷͨΊ) • ϓϩηεຖʹModelΛϩʔυ͢Δͱඞཁͳϝ ϞϦαΠζ͕େ͖͘ͳΔˠ Blue-Green DeployͷোʹͳΔ
ਖ਼PythonͰͷServing Πϯϑϥతʹਏ͍ࣄ͕ଟ͍…
ϝϞϦΛݡ͘͏ • fork͢ΔલʹmodelΛϩʔυ͠Copy on Write Λޮ͔͢ • k8sͷone process per
containerηΦϦ͋ ͑ͯഁ͍ͬͯΔ
Copy On Writeͷ෮श ϝϞϦ ϓϩηε ࢠϓϩηε 2.fork 1BHF" 1.allocation ಉ͡ྖҬΛࢀর
ϓϩηε͕ϝϞϦͷ༰Λ ॻ͖͑Δͱ… ϝϞϦ ϓϩηε ࢠϓϩηε 1BHF" 1BHF# OS͕ผͷྖҬΛAllocationͯ͠ݩσʔλΛίϐʔ͢Δ ผͷྖҬΛࢀর
Current Issues • Mercari APIͱͷͭͳ͗ࠐΈʹۤ࿑ ˠ Ұ௨Γ࡞Εޙ࠶ར༻Ͱ͖Δͣ • ਓؒͷߦಈΛ૬खʹ͍ͯ͠Δҝɺσʔλͷ͕ม ΘΓ͔ͬͨ͢Γɺ༧֎ͷ͕ൃੜͨ͠Γͯ͠ɺ
ରԠ͠ଓ͚Δඞཁ͕͋Δ ˠ ML Model࡞ऀʹෛ୲ֻ͕͔Γଓ͚Δ ˠ SREͱͯࣗ͠ಈԽΛؚΜͩΈͰղܾ͍ͨ͠
Future Plans • ࣾͷσʔλ͔ΒಛྔΛநग़͢Δͯ͠ Embedding͢Δ൚༻ͷΈ ˠదͳྨثͱΈ߹ΘͤΕɺ୭Ͱͦͦ͜ ͜ͷྨϞσϧΛ࡞Ͱ͖Δ? →FBLearner Flowతͳͭ? •
ࣾͷղܾʹಛԽͨ͠ઐ༻ͷAutoMLతͳԿ ͔?
·ͱΊ • ML ModelͷServingʹɺগ͠௨ৗͱҧ͏Πϯϑ ϥ͕ඞཁʹͳΔ →·ͩϕετɾϓϥΫςΟε͔Βͳ͍ • ਓͷߦಈΛ૬खʹ͢Δͷେม • ͦͦMLͳػೳΛຊ֨ӡ༻͠Α͏ͱ͢Δͱɺେ
෯ͳࣗಈԽɾΈԽΛਐΊͳ͍ͱ্ख͘ߦ͔ͳ ͍
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠!!
We are Hiring!!
SRE ML Reliability • SysML? MLOps? ৽͍͠Job description • SREεΩϧ+MLͷجૅࣝ
• MLΠϯϑϥͷࣗಈԽɾΈԽΛਪ͠ਐΊͯ ͘ΕΔਓࡐ • ͪΖΜଞͷ৬छઈࢍืूத!!
ৄࡉͪ͜Β https://careers.mercari.com/