機械学習によるマーケット健全化施策を支える技術

 機械学習によるマーケット健全化施策を支える技術

Transcript

  1. ػցֶशʹΑΔϚʔέοτ ݈શԽࢪࡦΛࢧ͑Δٕज़ Mercari Server Side Tech Talk Vol.2 ʙCREφΠτʙ
 


    hnakagawa

  2. ࣗݾ঺հ • Hirofumi Nakagawa (hnakagawa) • 2017೥7݄ೖࣾ • ॴଐ͸SRE •

    σόΠευϥΠό։ൃ͔Βϑϩϯ τΤϯυ։ൃ·Ͱ΍ΔԿͰ΋԰ • NOT MLΤϯδχΞ • https://github.com/hnakagawa
  3. ͓࢓ࣄ • ML Platform։ൃ • MLΤϯδχΞͱSREͷεΩϧΪϟοϓΛຒΊ Δ • ML Reliability,

    SysML?, MLOps? • SREͷཱ৔͔ΒCREνʔϜΛॿ͚Δ
  4. ML Platform • ಺੡ͷML Platform • kubernetesϕʔε • ϩʔΧϧ؀ڥͱΫϥελ؀ڥͷ ࠩΛந৅Խ͢Δ

    • ศརAPI܈ • طଘͷML FrameworkΛ࢖༻͠ ؆୯ʹTraining/ServingΛߦ͏ ؀ڥΛఏڙ
  5. ͦͷ͏ͪOSSͰެ։༧ఆ(ଟ෼

  6. ࠓ೔ͷAgenda͸
 ϦΞϧλΠϜ঎඼؂ࢹγεςϜ

  7. ϦΞϧλΠϜ঎඼؂ࢹγεςϜ • ௨শ Lovemachine • ML Platform্ʹ࣮૷͞Ε͍ͯΔ .-1MBUGPSN USBJOJOHDMVTUFS -PWFNBDIJOF

    ($4 GKE PubSub .-1MBUGPSN TFSWJOHDMVTUFS -PWFNBDIJOF
  8. ML ModelͷServing….?

  9. Model Serving APIͷߏ੒ྫ 5FOTPS'MPX
 4FSWJOH 5' .PEFM 5' .PEFM 'MBTL

    4,
 .PEFM 4,
 .PEFM 4,
 .PEFM gRPC .FSDBSJ"1* REST FlaskͰલॲཧΛߦ͍
 ཪͷTensorFlow Servingʹ౤͍͛ͯΔ
  10. 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
  11. TensorFlow Serving • TensorFlow project͕ఏڙͯ͠ ͍ΔServing؀ڥ • PythonॲཧܥΛհͣ͞ʹTFͷ modelΛservingͰ͖Δ •

    ඪ४ͷ࣮૷Ͱ͸gRPCͰAPIΛ ఏڙ
  12. ModelͱίϯςφɾΠϝʔδ • ڊେͳML ModelΛίϯςφɾΠϝʔδʹؚΊ Δ͔൱͔ • ؚΊͳ͍ͷͰ͋Ε͹Կॲʹ഑ஔ͢Δ͔ • ϙʔλϏϦςΟੑͱϩʔυ࣌ؒͷτϨʔυΦϑ •

    ྑ͍ΞΠσΟΞ͕͋Ε͹ڭ͑ͯԼ͍͞…
  13. ௨ৗͷAPIͱ͸ҧ͏ • ѻ͏ϦιʔεɺModelαΠζ͕େ͖͘ͳΔ৔ ߹͕ଟ͍(਺ඦMBʙ਺GB) • CPUɾϝϞϦϦιʔεͷফඅ͕ܹ͍͠ • ৔߹ʹΑͬͯ͸GPU΋࢖͏

  14. ϝϞϦফඅ໰୊ • LovemachineͷPython࣮૷෦෼͸࣮ߦ࣌ʹ໿ 2GBϝϞϦΛফඅ͢Δˠࠓޙ͞Βʹ૿͑Δ༧ ఆ΋͋Δ • Scikit-learnͰهड़͞ΕͨTF-IDF౳ͷલॲཧ෦ ෼͕େ͖͘ͳΔࣄ͕ଟ͍

  15. Pythonͱฒྻੑ • ౰વThread͕࢖͑ͳ͍(GILͷͨΊ) • ϓϩηεຖʹModelΛϩʔυ͢Δͱඞཁͳϝ ϞϦαΠζ͕େ͖͘ͳΔˠ Blue-Green Deployͷো֐ʹͳΔ

  16. ਖ਼௚PythonͰͷServing͸
 Πϯϑϥతʹਏ͍ࣄ͕ଟ͍…

  17. ϝϞϦΛݡ͘࢖͏ • fork͢ΔલʹmodelΛϩʔυ͠Copy on Write Λޮ͔͢ • k8sͷone process per

    containerηΦϦ͸͋ ͑ͯഁ͍ͬͯΔ
  18. Copy On Writeͷ෮श ϝϞϦ ਌ϓϩηε ࢠϓϩηε 2.fork 1BHF" 1.allocation ಉ͡ྖҬΛࢀর

  19. ϓϩηε͕ϝϞϦͷ಺༰Λ
 ॻ͖׵͑Δͱ… ϝϞϦ ਌ϓϩηε ࢠϓϩηε 1BHF" 1BHF# OS͕ผͷྖҬΛAllocationͯ͠ݩσʔλΛίϐʔ͢Δ ผͷྖҬΛࢀর

  20. Current Issues • Mercari APIͱͷͭͳ͗ࠐΈʹۤ࿑
 ˠ Ұ௨Γ࡞Ε͹ޙ͸࠶ར༻Ͱ͖Δ͸ͣ • ਓؒͷߦಈΛ૬खʹ͍ͯ͠Δҝɺσʔλͷ܏޲͕ม ΘΓ΍͔ͬͨ͢Γɺ༧૝֎ͷ໰୊͕ൃੜͨ͠Γͯ͠ɺ

    ରԠ͠ଓ͚Δඞཁ͕͋Δ
 ˠ ML Model࡞੒ऀʹෛ୲ֻ͕͔Γଓ͚Δ
 ˠ SREͱͯ͠͸ࣗಈԽΛؚΜͩ࢓૊ΈͰղܾ͍ͨ͠
  21. Future Plans • ࣾ಺ͷσʔλ͔Βಛ௃ྔΛநग़͢Δͯ͠ Embedding͢Δ൚༻ͷ࢓૊Έ
 ˠద౰ͳ෼ྨثͱ૊Έ߹ΘͤΕ͹ɺ୭Ͱ΋ͦͦ͜ ͜ͷ෼ྨϞσϧΛ࡞੒Ͱ͖Δ?
 →FBLearner Flowతͳ΍ͭ? •

    ࣾ಺ͷ໰୊ղܾʹಛԽͨ͠ઐ༻ͷAutoMLతͳԿ ͔?
  22. ·ͱΊ • ML ModelͷServingʹ͸ɺগ͠௨ৗͱҧ͏Πϯϑ ϥ͕ඞཁʹͳΔ
 →·ͩϕετɾϓϥΫςΟε͸෼͔Βͳ͍ • ਓͷߦಈΛ૬खʹ͢Δͷ͸େม • ͦ΋ͦ΋MLͳػೳΛຊ֨ӡ༻͠Α͏ͱ͢Δͱɺେ

    ෯ͳࣗಈԽɾ࢓૊ΈԽΛਐΊͳ͍ͱ্ख͘ߦ͔ͳ ͍
  23. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠!!

  24. We are Hiring!!

  25. SRE ML Reliability • SysML? MLOps? ৽͍͠Job description • SREεΩϧ+ML෼໺ͷجૅ஌ࣝ

    • MLΠϯϑϥͷࣗಈԽɾ࢓૊ΈԽΛਪ͠ਐΊͯ ͘ΕΔਓࡐ • ΋ͪΖΜଞͷ৬छ΋ઈࢍืूத!!
  26. ৄࡉ͸ͪ͜Β
 https://careers.mercari.com/