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
130
Kanazawa_AI.pdf
hnakagawa
0
150
メルカリ写真検索における Amazon EKS の活用事例と プロダクトにおけるEdgeAI technologyの展望
hnakagawa
5
8.6k
メルカリの写真検索を支えるバックエンド CCSE 2019 version
hnakagawa
0
250
メルカリ写真検索における Amazon EKS の活用事例
hnakagawa
6
29k
メルカリの写真検索を支えるバックエンド
hnakagawa
1
1.1k
Mercari ML Platform
hnakagawa
1
17k
mlct.pdf
hnakagawa
2
1.9k
メルカリのマーケット健全化施策を支えるML基盤
hnakagawa
10
8.8k
Other Decks in Programming
See All in Programming
Kotlin 2.0 and Beyond
antonarhipov
2
140
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
150
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
430
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
650
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
370
Amebaチョイス立ち上げの裏側 ~依存システムとの闘い~
daichi_igarashi
0
220
Understand the mechanism! Let's do screenshots tests of Compose Previews with various variations / 仕組みから理解する!Composeプレビューを様々なバリエーションでスクリーンショットテストしよう
sumio
3
350
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
120
The Future of Frontend i18n : Intl.MessageFormat
sajikix
1
2.5k
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
240
Go1.23で入った errorsパッケージの小さなアプデ
kuro_kurorrr
1
210
Featured
See All Featured
Designing for Performance
lara
604
68k
Adopting Sorbet at Scale
ufuk
73
8.9k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.2k
Why Our Code Smells
bkeepers
PRO
334
56k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
Speed Design
sergeychernyshev
21
420
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
Designing Experiences People Love
moore
138
23k
Faster Mobile Websites
deanohume
304
30k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
35
6.8k
Building Adaptive Systems
keathley
36
2.1k
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/