端到端機器學習框架的架構元件

端到端機器學習

Joshua Stapleton

Machine Learning Engineer

Feature store

特徵

  • 特徵選擇
  • 特徵工程

Feature store

  • 特徵的集中儲存庫
  • 確保一致性,減少重複
  • 促進共用與探索
  • 標準化特徵轉換與計算

加入 feature store 的機器學習生命週期示意圖

端到端機器學習

Feast

Feast

  • 實作 feature store 的常見工具
  • 為 ML 特徵提供統一的管理、儲存、服務與探索

原則

  • 以 feature set 定義並註冊特徵
  • Feature set:相關特徵與中繼資料的分組

範例:心臟病特徵

  • 病患實體
  • 關聯特徵(膽固醇、年齡、性別)
端到端機器學習

Feast feature store:第 1 部分

from feast import Field, Entity, ValueType, FeatureStore
from feast.data_source import FileSource

# Define the entity, which in this case is a patient, and features patient = Entity(name="patient", join_keys=["patient_id"])
chol = Field(name="chol", dtype=Float32) age = Field(name="age", dtype=Int32) ...
# Define the data source data_source = FileSource( path="/path_to_heart_disease_dataset.csv", event_timestamp_column="event_timestamp", created_timestamp_column="created")
端到端機器學習

Feast feature store:第 2 部分

# ... continued
# Create a feature view of the data
heart_disease_fv = FeatureView(name="heart_disease", entities=[patient],
    schema=[cholesterol, ...], ttl=timedelta(days=1), input=data_source,)

# Create a FeatureStore object store = FeatureStore(repo_path=".")
# Register the FeatureView store.apply([patient, heart_disease_fv])
端到端機器學習

模型登錄庫

模型登錄庫

  • 版本控制系統
  • 追蹤模型的不同版本
  • 加註模型
  • 長期追蹤效能

好處

  • 更易組織
  • 提高透明度
  • 可重現性

加入 model registry 的機器學習生命週期示意圖

端到端機器學習

一起來練習吧!

端到端機器學習

Preparing Video For Download...