LBRY Block Explorer

LBRY Claims • the-journey-of-ai-product-development

19cfd4036aa3d2968de0f7ff57db8206d81a7300

Published By
Created On
20 Sep 2022 04:56:49 UTC
Transaction ID
Cost
Safe for Work
Free
Yes
The Journey of AI Product Development and Improvement|張仲樸 Enzo Chang|黃奕鳴 Polo Huang|PyCon APAC 2022
PyCon APAC 2022|一般演講 Talks|國泰金控 Cathay Financial Holdings / 美光科技 Micron 冠名贊助

✏️ 共筆 Note:https://hackmd.io/@pycontw/HJCWPpXko
?? Slido:https://app.sli.do/event/dnRPNWieaa4Po8HXUX4tLg
? 投影片 Slides:https://drive.google.com/file/d/1puUky1GHzn3L9Snv_Z3h4BI4Z6q-5szl/view
? 語言 Language:中文演講/英文投影片 Chinese talk w. English slides
? 層級 Level:中階 Intermediate
? 分類 Category:應用 Application

? 摘要 Abstract ?
MLOps 是機器學習 (Machine Learning) 與軟體開發維運 (DevOps) 結合的縮寫,近年來業界將 AI產品化特別受重視的領域,因為 ML/DL 模型離開實驗環境,將面臨更多效能、穩定性、持續優化等挑戰。本演講以企業內部的產品為例子,分享我們在實務上如何讓商業需求以及技術研究落地,在完全基於 Python 的環境,從零打造出基礎可用的系統,到經過兩階段迭代升級的現行版本,過程中在架構設計與工具選擇上所遇到的瓶頸和困難點,以及我們的解決方式。

? 說明 Description ?
MLOps 為機器學習 (Machine Learning) 與軟體開發維運 (DevOps) 結合的縮寫,是近年來業界將 AI產品化的過程中特別受到重視的領域,因為 ML/DL 模型離開實驗環境,將面臨更多效能、穩定性、持續優化等挑戰。本演講以企業內部的產品為例子,分享我們在實務上如何讓商業需求以及技術研究落地,完全基於 Python 的環境,從零打造出基礎可用的系統,到經過兩階段迭代升級的現行版本,過程中在架構設計與工具選擇上所遇到的瓶頸和困難點,以及我們的解決方式。

涉及的範圍較廣,卻絕大部分都是在 Python 環境、使用相關套件開發,包含演算法、環境/版本管理、服務部署、資料儲存、ETL、工作流程管理等,以下簡述各個項目的功能與定位:

Service
- FastAPI (https://fastapi.tiangolo.com/) & Celery (https://docs.celeryq.dev/en/stable/)
由於有即時運算的需求,所以我們將後端分成兩塊,一個是接收請求提供結果的 Server (FastAPI),FastAPI 提供高效率輕量化的 Framework。另一個是及時運算的 Worker (Celery),Celery 幫助我們建立 Distributed System,讓我們有更多的擴展性。

ML Algorithm & Calculation
- Pytorch (https://pytorch.org/)
我們從 Pytorch 中取用 Pretrain Model (VGG & BERT),將圖片、文字轉化為可量化的向量。

- Faiss (https://github.com/facebookresearch/faiss)
向量資料間需要做相似度計算作為我們的預測結果,我們選用的是 Facebook 開源的 Faiss,能夠做到向量計算&向量壓縮,讓我們可以在資源,速度與精確度之間做抉擇。

Data Storage
- PyMongo (https://pymongo.readthedocs.io/en/stable/)
由於資料間沒有儲存關聯性的需求,所以我們選用 MongoDB (Nosql) 作為資料庫,在 Python 端我們使用 Pymongo & Motor 對 MongoDB 存取 ML Model 處理過後的特徵資料。

- Cloud Storage (https://cloud.google.com/storage)
VM 彼此之間的檔案存取我們選用雲端方案,穩定且在使用上也非常方便。在 Python 端我們使用 Google 提供的 Python SDK 操作 Cloud Storage。

Vector ETL
- Pika (https://pika.readthedocs.io/en/stable/) & aiohttp (https://docs.aiohttp.org/en/stable/)
我們採用 RabbitMQ(Pika) 建構商品資料向量轉換流程,Producer 夠過異步爬蟲(aiohttp)進行資料資料蒐集及過濾;Consumer 負責任務收集和向量轉換(GPU運算),兩個系統彼此不會直接溝通,而是將任務透過 Queue 暫存與傳遞,提高擴展性並加速任務的消化速度。

Workflow Management
- Apache Airflow (https://pypi.org/project/pymongo/)
整個產品架構可分為 Model Training Pipeline、Model Serving Pipeline & ETL Pipeline,任務間有高度的相依性與併行需求,我們使用 Airflow 作為工作流程管理工具。

Reference
- MLOps: Continuous delivery and automation pipelines in machine learning (https://cloud.google.com/architecture/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning)

? 講者介紹 About Speaker - 張仲樸 Enzo Chang / 黃奕鳴 Polo Huang ?
張仲樸 Enzo Chang
I'm Enzo, an atypical developer with experience covering Data x Software x Education, working as a Data Engineer & Scrum Master in e-commerce company, focusing on ETL, Data Pipeline, MLOps, Crawler & RESTful API. Passionate about learning and sharing. I have been a volunteer and speaker in the Data & Agile community for a long time, and I have served as a Python Web Crawler course lecturer in the company.
? Feel free to contact me!
Linkedin ➡️ https://www.linkedin.com/in/enzochang/

黃奕鳴 Polo Huang
As a software engineer with 4 years of experience in the E-commerce industry, I've been in charge of ML Ops and Data Pipeline by Python. Furthermore, my focus area also includes FastAPI, MySQL, and Docker. As for career planning in the next few years, implementing machine learning models and learning ML Ops are my major objectives.
? Feel free to contact me!
LinkedIn: www.linkedin.com/in/yiming-huang-6026601b3

#pycontw #pyconapac2022 #python #mlops #devops #machinelearning #pymongo #pytorch #pika #faiss #celery #fastapi

Follow “PyCon Taiwan”
⭐️ Official Website: https://tw.pycon.org
⭐️ Facebook: https://www.facebook.com/pycontw
⭐️ Instagram: https://www.instagram.com/pycontw
⭐️ Twitter: https://twitter.com/PyConTW
⭐️ LinkedIn: https://www.linkedin.com/company/pycontw
⭐️ Blogger: https://pycontw.blogspot.com
...
https://www.youtube.com/watch?v=L00UMsORp6Q
Author
Content Type
Unspecified
video/mp4
Language
English
Open in LBRY

More from the publisher

Controlling
VIDEO
[PYCO
Controlling
VIDEO
CHALL
Controlling
VIDEO
MY HI
Controlling
VIDEO
#SHOR
Controlling
VIDEO
GRAPH
Controlling
VIDEO
S3EP2
Controlling
VIDEO
KEYNO
Controlling
VIDEO
BUILD
Controlling
VIDEO
S3EP1