Skip to main content

Python SDK for Feast

Project description


unit-tests integration-tests-and-build java-integration-tests linter Docs Latest Python API License GitHub Release

Overview

Feast is an open source feature store for machine learning. Feast is the fastest path to productionizing analytic data for model training and online inference.

Please see our documentation for more information about the project.

📐 Architecture

The above architecture is the minimal Feast deployment. Want to run the full Feast on Snowflake/GCP/AWS? Click here.

🐣 Getting Started

1. Install Feast

pip install feast

2. Create a feature repository

feast init my_feature_repo
cd my_feature_repo

3. Register your feature definitions and set up your feature store

feast apply

4. Explore your data in the web UI (experimental)

Web UI

feast ui

5. Build a training dataset

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

6. Load feature values into your online store

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!

7. Read online features at low latency

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]
}

📦 Functionality and Roadmap

The list below contains the functionality that contributors are planning to develop for Feast

🎓 Important Resources

Please refer to the official documentation at Documentation

👋 Contributing

Feast is a community project and is still under active development. Please have a look at our contributing and development guides if you want to contribute to the project:

✨ Contributors

Thanks goes to these incredible people:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feast-0.21.2.tar.gz (3.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

feast-0.21.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

feast-0.21.2-cp310-cp310-macosx_10_15_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

feast-0.21.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

feast-0.21.2-cp39-cp39-macosx_10_15_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

feast-0.21.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

feast-0.21.2-cp38-cp38-macosx_10_15_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

feast-0.21.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

feast-0.21.2-cp37-cp37m-macosx_10_15_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

File details

Details for the file feast-0.21.2.tar.gz.

File metadata

  • Download URL: feast-0.21.2.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for feast-0.21.2.tar.gz
Algorithm Hash digest
SHA256 9c5f9588975475e152117c6301cdda4de2eeebb8336ce4d1b4296751d0d4c3ff
MD5 c4d0f5c4956ef836046e3bb5e9779830
BLAKE2b-256 7d08418593b2774a081646a244964d97ea5d539bb70380f28adf875642071fbe

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 95ffba796f7185d0070482b583ca48ff296ff823029a4a37dda86cacdf218f3e
MD5 a7a709d000a533532ff3e9be070ed51c
BLAKE2b-256 46bedd9cdef855f9b0d485d56badb9a67a8165669c29e5e2b87db5706597a373

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2e0ce7071320219a9f2dac74b43c5016c5d3817a794ae012e9c25631be58b10c
MD5 0d3409f191981bd5426b2a1174719dd3
BLAKE2b-256 29900b718b99df3ab55a137abe328ee26641ddb6e76fac57059960ed1e8465ff

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6b516a988eea5b251c1c3b17093de79c88e3feb4e49e94f7e8f25d6a872ceee1
MD5 84095e8d3445fc0488612a6b37911293
BLAKE2b-256 0b829fcc1cdbe14cb8e95242d0aadc92d6f6ec83c5ad9c239e57994a28943706

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0411b4e778f6b9df1dc5ad931cb71594e2700472aa40fbdd4791929794ca8ced
MD5 5fbf9c4260d6de6dd01b74a9242309e6
BLAKE2b-256 5890b387c209ebfe405f4ef1fe33b03d9bcbae3b8e8954b4d3aa971eeadd1598

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 890c497308c3a27914d5ca015387b0a427d97184ad0af43d9fdbfbfbfc0165da
MD5 2deb054993200cebe460619f7f2842f6
BLAKE2b-256 4365caa17d71100a2638d3c62c1f3f5d601c6389aa2e80854232f5af25a70945

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 075d5a14d5ba48090029bf20262b0e30b86bfeec4492350820327c624a30c728
MD5 9c566078131b22f8d76d64f702480957
BLAKE2b-256 0d8c22d300738cf1aabb1ab9304f3f3e784869731cad8f26faf3239127f2d581

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9ad6c914ae12a8182937e5a0a60cce70aeb25e28672e3a972803e9e0a40f174
MD5 2477e869ff6b9ded9354d8a7e32a68c6
BLAKE2b-256 234d2ca120a9dd25079a9842f017d44c84480e9e1a74bbc92630f71f91ae3498

See more details on using hashes here.

File details

Details for the file feast-0.21.2-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for feast-0.21.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e8fe3e0819086f19eaa8a4399351b192fc81dccfa5af541e55f933dc561d611a
MD5 c3616085cef90a492b574de2c4e34604
BLAKE2b-256 0794222edbb4e69024d6d9f5661afe25a99730dc7509d3520ecae8a840f8e38b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page