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

MLOps Research

Jungwon Seo
January 20, 2021
36

MLOps Research

Jungwon Seo

January 20, 2021
Tweet

Transcript

  1. ݠन۞׬ ౵੉೐ۄੋ ੌױ ೡ ࣻ ੓ח ؀۽ ߓನܳ ೧ࠁ੗ •

    ؘ੉ఠ ׮਍۽٘ ژח ௼܀݂ • ੹୊ܻ റ google driveա local diskী ੷੢ • Colab ژח Localীࢲ ݽ؛ ੘স • Grid Search ੉ਊ೧ࢲ ઁੌ જ਷ ݽ؛ ੷੢ • ੷੢ೠ ݽ؛ weight ч Flaskীࢲ Load೧ࢲ API ഋక۽ Serve
  2. ݠन۞׬ ౵੉೐ۄੋ MLOps੄ ೙ਃࢿ • ۄ݂߰ػ ࢜۽਍ ؘ੉ఠо ૑ࣘ੸ਵ۽ ऺੋ׮.

    (৘: ࢑ఋష੊) • ࢜۽਍ ؘ੉ఠী ݏח ୭੸੄ ೞ੉ಌ ౵ۄ޷ఠо ׳ۄ ૕ ࣻ ੓׮. • ইפݶ ইফ ࢜۽਍ ݽ؛੉ ೙ਃೡ ࣻ ب ੓׮. • ׮ܲ ౱ਗب ঱ઁա ੗ਬ܂ѱ ݽ؛ਸ పझ౟ ೧ࠁҊ र׮. • ӒܻҊ Ӓ ݽ؛੉ ߬झ౟ݶ ߄۽ ߓನо عਵݶ ೠ׮. • API ਃ୒੉ ݆ইઉ ߓನ ࢲߡ੄ ഛ੢ࢿ੉ ਃҳ ؼ ࣻ ੓׮.
  3. MLflow ള۲җ ݽ؛ ੷੢/ߓನী ҙৈ • Tensorboard + Github э਷

    ו՝ • Tracking, Project, Model ࣁо૑੄ ೨ब ӝמ Raw data Preprocessing & Feature Engineering Training Store & Deploy Serve Model
  4. MLflow Tracking • ӝઓী ੘সೞ؍ python௏٘ী য়ܲଃҗ э੉ ௏٘ܳ ୶оೞݶ,

    ೙ਃೠ ੿ࠁٜਸ ӝ ۾оמ • ݫݽ੢੉ա ౵ੌݺী ೞ੉ಌ౵ۄ޷ఠܳ ॄ ֬ח ೯ਤܳ ೞ૑ ঋইب ؽ!
  5. MLflow Project • ղо ੘স ೞ؍ ௏٘ܳ যڌѱ ҕਬೞ૑? թ੉

    ੘সೞ؍ ௏٘ܳ যڌѱ ج۰ࠁ૑? • Docker୊ۢ ಁః૚ ೡ ࣻ ੓૑ ঋਸө?
  6. MLflow Model • ള۲ػ ݽ؛ٜਸ ੜ ੿ܻ೧ ֬Ҋ যڃ Ѫਸ

    ߓನೡ૑ ߄۽ Ҋܳ ࣻ ੓׮ݶ? • ੗୓ ࢲߡ۽ ߓನܳ ೡ ࣻب ੓Ҋ (ই݃ ೒ۄझ௼), sagemakerী ৢܻח ݺ۸য/௏٘ ө ૑ ઁҕ ml f l ow models serve -m model -p 1234 ml f l ow sagemaker build-and-push-container [OPTIONS]
  7. MLflow ੿ܻ • ౟ۨ੉׬ਸ ୓҅੸ਵ۽ ೡ ࣻ ੓׮. • ഈসਊਵ۽

    ࢎਊद, ml f l ow ࢲߡܳ ٮ۽ ৻ࠗী فযࢲ, п੗੄ ۽ஸജ҃ ژח ׮ܲ ജ҃ ীࢲ ള۲ೠ Ѿҗޛਸ ೠ Ҕীࢲ ҙܻ ೡ ࣻ ੓׮.
  8. Sagemaker ݽ؛ ള۲ / ࢲࡂী ҙৈ • ௏ە + ߓನࢲߡ੄

    ו՝ • ݽ؛ ߓನद Ҋ۰ࢎ೦ • औѱ ݽ؛ਸ ߸҃ ೡ ࣻ ੓חо? • ߓನࢲߡ੄ ഛ੢ࢿ੉ ੓חо? (Vertically, Horizontally) Raw data Preprocessing & Feature Engineering Training Store & Deploy Serve Model
  9. • ׮਺җ python sdkܳ ࢎਊೞݶ, ௏٘۽ ߓನ ࢲߡܳ ҳ୷ ೡ

    ࣻ ੓Ҋ, ੽Ӕ оמೠ ূ٘ನ ੋ౟ө૑ ઁҕػ׮. Sagemaker Deploy
  10. Sagemaker ׮নೠ ೐ۨ੐ਕ௼ܳ Sagemakerী ߓನ • ৻ࠗীࢲ ള۲ೠ ݽ؛ਸ s3dp

    স۽٘ೞৈ, ׮਺җ э੉ ݽ؛ ߓನ ߂ ূ٘ನੋ౟ ҳࢿਸ ೡ ࣻ ੓׮. https://aws.amazon.com/blogs/machine-learning/deploy-trained-keras-or-tensor f l ow-models-using-amazon-sagemaker/ https://sagemaker.readthedocs.io/en/stable/frameworks/pytorch/using_pytorch.html#deploy-pytorch-models
  11. Sagemaker Auto Scailing ਸ ഝਊೠ ഛ੢ • ߓನػ ݽ؛ਸ ݒ׏঴ܻ

    ഛ੢ ೡ ࣻب ੓૑݅, ইې৬ э੉ ୭ࣗ-୭؀੄ ੋझఢझ ѐࣻܳ ҳࢿೞҊ, য়ܲଃ Ӓܿҗ э੉ ౠ੿ ૑಴(৘ٜܳয ূ٘ನੋ౟ ഐ୹ ࣻ)ܳ ૑੿ೞৈ য়షझ ாੌ݂ਸ Ѧয ֬ਸ ࣻ ੓׮. ੋझఢझ׼ ࠙׼ ಣӐ ഐ୹ ࣻ
  12. Airflow ਤ੄ җ੿ٜਸ ೠߣী ҙܻ • STT ࢲ࠺झܳ ٜ݅঻׮Ҋ о੿,

    ૑ࣘ੸/઱ӝ੸ਵ۽ ݽ؛ਸ ѐࢶೞӝ ਤ೧ࢲח? • ୶о੸ੋ ؘ੉ఠ ੸ਊ • ೙ਃद ࢜۽਍ ੹୊ܻ ߑध بੑ • ೙ਃद ࢜۽਍ ݽ؛ بੑ • ߓನ • ੉ җ੿ਸ ೠߣ ೡ ٸ݃׮ ੹੬ਸ ஖ܙ ࣻח হ૑ ঋ਷о? Raw data Preprocessing & Feature Engineering Training Store & Deploy Serve Model
  13. Airflow ਕ௼ ೒۽਋ ҙܻ ೒ۖಬ • ೨ब ஶࣆ • DAG(Directed

    Acyclic Graph, ߑೱࢿ ࠺ ࢎ੉௿ Ӓې೐): taskٜ੄ ੄ઓࢿ ߂ ࣽࢲܳ Ѿ੿ • Preprocessing -> Training - > Deploying • Operator • BashOperator: Bash ݺ۸যܳ ੸ਊ • PythonOperator: Python ௏٘ܳ ੸ਊ • SagemakerOperator: Sagemaker SDKܳ ੸ਊ • Schedule • ਃ୒द प೯ ژח ઱ӝ੸ प೯ਸ Ѿ੿ • ౠ੿दӝ ৘ড
  14. Airflow ਕ௼ ೒۽਋ ҙܻ ೒ۖಬ • য়ܲଃ ௏٘ח download, train,

    serve ࣁо૑, झయਵ۽ ҳࢿػ DAG • pythonOperatorܳ ࢎਊೞݶ, python ೣࣻܳ ߄۽ ഐ୹ оמ • BashOperatorח Bash ݺ۸যܳ • depends_on_pastח ੉੹ కझ௼৬੄ ઙࣘࢿਸ
  15. ੿ܻ • Air f l owܳ ੉ਊ೧ ੹୓ ੘সਸ ઑਯ

    ೞҊ • ML f l owܳ ੉ਊ೧ ള۲Ѿҗܳ ҙܻೞݴ ୭Ҋ੄ ݽ؛ਸ ଺Ҋ • ୭Ҋ੄ ݽ؛ਸ Sagemakerী ߓನী ഛ੢ࢿਸ ыח ݽ؛ ࢲߡܳ ҳ୷ೠ׮. • ੉ٸ dockerա s3৬ э਷ ࢲ࠺झ ߂ ࣗ೐౟ਝযܳ ੜ ࢴয઱ݶ ഻ঁ উ੿੸੉Ҋ ഛ੢ࢿ ੓ח ౵੉೐ۄੋਸ ҳ୷ ೡࣻ ੓׮.