Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vertex AI 試してみた / tried-vertex-ai

Vertex AI 試してみた / tried-vertex-ai

2022/04/24 (日) Python機械学習勉強会 in 新潟で発表した資料です。

kasacchiful

April 24, 2022
Tweet

More Decks by kasacchiful

Other Decks in Programming

Transcript

  1. Classmethod, Inc. Solutions Architect / Software Develper Favorite: Community: •

    JAWS-UG Niigata • Python ML in Niigata • JaSST Niigata • ASTER • SWANII • etc. Hiroshi Kasahara @kasacchiful @kasacchiful 2
  2. MLOps • ػցֶशϓϩδΣΫτΛԁ׈ʹਐΊΔͨΊͷऔΓ૊Έɾମ੍ɾࢥ૝ • ػցֶशνʔϜ / ։ൃνʔϜ / ӡ༻νʔϜ ͕͓ޓ͍ʹڠௐ͠߹͏͜ͱ

    ͰɺػցֶशϞσϧͷ࣮૷͔Βӡ༻·ͰͷϥΠϑαΠΫϧΛԁ׈ʹਐ ΊɺܧଓతʹՁ஋Λఏڙ͢Δ͜ͱΛ໨తʹͯ͠Δ • DevOpsͷػցֶशϓϩδΣΫτ൛ • ʮ։ൃαΠΫϧͷ୹ॖʯʮ։ൃࣗମͷਝ଎Խʯʮ৴པੑߴ͍ϦϦʔεʯ ΛMLϓϩδΣΫτʹ΋
  3. MLOpsؔ࿈αʔϏε • AWS • Amazon SageMaker • Google Cloud •

    Vertex AI • Azure • Azure Machine Learning
  4. curlͰࢼ͢ curl -X POST \ -H "Authorization: Bearer $(gcloud auth

    print-access-token)" \ -H "Content-Type: application/json" \ https://asia-northeast1-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/asia-northeast1/endpoints/${ENDPOINT_ID}:predict \ -d “@${INPUT_DATA_FILE} " { "predictions": [ { "classes": [ "1" , "2 " ] , "scores": [ 0.98835468292236328 , 0.0116453049704432 5 ] } ] , "deployedModelId": "8383556259466444800" , "model": "projects/1066851579090/locations/asia-northeast1/models/6083061274810253312" , "modelDisplayName": "sample_tabular_dataset_model " }
  5. ύΠϓϥΠϯ • kube fl ow pipelines ΋͘͠͸ Tensor fl ow

    Extended ͰύΠϓϥ ΠϯΛهࡌͯ͠ɺVertex AIʹొ ࿥ IUUQTDMPVEHPPHMFDPNCMPHKBQSPEVDUTBJNBDIJOFMFBSOJOHTFSWFSMFTTNBDIJOFMFBSOJOHQJQFMJOFTPOHPPHMFDMPVE
  6. MLOpsΠϯϑϥج൫ʹඞཁͳ͜ͱ • σʔλιʔεͱɺ͔ͦ͜Βੜ੒͞ΕΔσʔληοτͷ؅ཧ • Vertex AIͰ֤छσʔληοτΛ؅ཧͰ͖Δ • ֶशࡁϞσϧͷ؅ཧ • Ϟσϧͷόʔδϣϯ౳ͷ؅ཧ͕Մೳ

    • CI / CDؚΜͩMLσϦόϦύΠϓϥΠϯ • kebe fl ow pipelines΋͘͠͸Tensor fl ow ExtendedͰߏஙՄೳ • Ұ࿈ͷδϣϒΛ؆୯ʹճͨ͢Ίͷίϯςφ • طଘͷίϯςφར༻ͷ΄͔ɺΧελϜίϯςφ΋࢖༻Մೳ
  7. SageMaker / Vertex AI ͷػೳ σʔληοτ ͷ࡞੒ ਓྗʹΑΔΞ ϊςʔγϣϯ ࢧԉ

    ಛ௃ྔϦϙδ τϦ ύΠϓϥΠϯ ϞσϧͷධՁ σϓϩΠ ϞχλϦϯά 4BHF.BLFS 4BHF.BLFS %BUB 8SBOHMFS 4BHF.BLFS (SPVOE5SVU I 4BHF.BLFS 'FBUVSF 4UPSF 4BHF.BLFS 1JQFMJOF 4BHF.BLFS %FCVHHFS 4BHF.BLFS $MBSJGZ όονਪ࿦˓ ϦΞϧλΠϜ ਪ࿦˓ 4BHF.BLFS .PEFM .POJUFS 7FSUFY"* σʔληοτ ϥϕϧ෇λε Ϋ 7FSUFY"* 'FBUVSF 4UPSF 7FSUFY"* 1JQFMJOF ϞσϧͷධՁ όονਪ࿦˓ ϦΞϧλΠϜ ਪ࿦˓ 7FSUFY"* .POJUPSJOH
  8. ॴײ • ݁ߏGUI্Ͱૢ࡞Ͱ͖Δ͠ɺΘ͔Γ΍͍͢ • ಛʹAutoML • Vertex AIͷPython SDK͕༻ҙ͞ΕͯΔͷͰɺίʔυͰ؅ཧ΋Ͱ͖Δ •

    SageMaker΋Python SDK͕͋Δ • ଞͷGoogle CloudαʔϏεͱͷ࿈ܞํ๏͕Α͘Θ͔Βͳ͍ (ଟ෼Ͱ͖Δ ΜͩΖ͏͚Ͳ)