feast
v0.41.3
來 Slack 打個招呼吧!
Feast( Feature Store )是機器學習的開源特徵儲存。 Feast 是管理現有基礎設施以生產用於模型訓練和線上推理的分析資料的最快途徑。
Feast 允許 ML 平台團隊:
請參閱我們的文件以獲取有關該項目的更多資訊。
上述架構是最小的 Feast 部署。想要在 Snowflake/GCP/AWS 上運行完整的盛宴嗎?點這裡。
pip install feast
feast init my_feature_repo
cd my_feature_repo/feature_repo
feast apply
feast ui
from feast import FeatureStore
import pandas as pd
from datetime import datetime
entity_df = pd . DataFrame . from_dict ({
"driver_id" : [ 1001 , 1002 , 1003 , 1004 ],
"event_timestamp" : [
datetime ( 2021 , 4 , 12 , 10 , 59 , 42 ),
datetime ( 2021 , 4 , 12 , 8 , 12 , 10 ),
datetime ( 2021 , 4 , 12 , 16 , 40 , 26 ),
datetime ( 2021 , 4 , 12 , 15 , 1 , 12 )
]
})
store = FeatureStore ( repo_path = "." )
training_df = store . get_historical_features (
entity_df = entity_df ,
features = [
'driver_hourly_stats:conv_rate' ,
'driver_hourly_stats:acc_rate' ,
'driver_hourly_stats:avg_daily_trips'
],
). to_df ()
print ( training_df . head ())
# Train model
# model = ml.fit(training_df)
event_timestamp driver_id conv_rate acc_rate avg_daily_trips
0 2021-04-12 08:12:10+00:00 1002 0.713465 0.597095 531
1 2021-04-12 10:59:42+00:00 1001 0.072752 0.044344 11
2 2021-04-12 15:01:12+00:00 1004 0.658182 0.079150 220
3 2021-04-12 16:40:26+00:00 1003 0.162092 0.309035 959
CURRENT_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S")
feast materialize-incremental $CURRENT_TIME
Materializing feature view driver_hourly_stats from 2021-04-14 to 2021-04-15 done!
from pprint import pprint
from feast import FeatureStore
store = FeatureStore ( repo_path = "." )
feature_vector = store . get_online_features (
features = [
'driver_hourly_stats:conv_rate' ,
'driver_hourly_stats:acc_rate' ,
'driver_hourly_stats:avg_daily_trips'
],
entity_rows = [{ "driver_id" : 1001 }]
). to_dict ()
pprint ( feature_vector )
# Make prediction
# model.predict(feature_vector)
{
"driver_id" : [ 1001 ],
"driver_hourly_stats__conv_rate" : [ 0.49274 ],
"driver_hourly_stats__acc_rate" : [ 0.92743 ],
"driver_hourly_stats__avg_daily_trips" : [ 72 ]
}
下面的清單包含貢獻者計劃為 Feast 開發的功能。
我們歡迎對路線圖中的所有項目做出貢獻!
數據來源
線下商店
網上商店
特徵工程
串流媒體
部署
特色服務
數據品質管理(參見 RFC)
功能發現與治理
自然語言處理
請參考官方文件:Documentation
Feast 是一個社區項目,仍在積極開發中。如果您想為該專案做出貢獻,請查看我們的貢獻和開發指南:
感謝這些不可思議的人: