Metadata-Version: 2.1
Name: feast
Version: 0.10.2
Summary: Python SDK for Feast
Home-page: https://github.com/feast-dev/feast
Author: Feast
License: Apache
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
Requires-Dist: Click (==7.*)
Requires-Dist: colorama (>=0.3.9)
Requires-Dist: fastavro (<0.23,>=0.22.11)
Requires-Dist: google-api-core (>=1.23.0)
Requires-Dist: google-cloud-bigquery (>=2.0.*)
Requires-Dist: google-cloud-bigquery-storage (>=2.0.0)
Requires-Dist: google-cloud-storage (>=1.20.*)
Requires-Dist: google-cloud-core (==1.4.*)
Requires-Dist: googleapis-common-protos (==1.52.*)
Requires-Dist: grpcio (==1.31.0)
Requires-Dist: Jinja2 (>=2.0.0)
Requires-Dist: jsonschema
Requires-Dist: mmh3
Requires-Dist: numpy (<1.20.0)
Requires-Dist: pandas (~=1.0.0)
Requires-Dist: pandavro (==1.5.*)
Requires-Dist: protobuf (>=3.10)
Requires-Dist: pyarrow (==2.0.0)
Requires-Dist: pydantic (>=1.0.0)
Requires-Dist: PyYAML (==5.3.*)
Requires-Dist: tabulate (==0.8.*)
Requires-Dist: toml (==0.10.*)
Requires-Dist: tqdm (==4.*)
Provides-Extra: ci
Requires-Dist: cryptography (==3.3.2) ; extra == 'ci'
Requires-Dist: flake8 ; extra == 'ci'
Requires-Dist: black (==19.10b0) ; extra == 'ci'
Requires-Dist: isort (>=5) ; extra == 'ci'
Requires-Dist: grpcio-tools (==1.31.0) ; extra == 'ci'
Requires-Dist: grpcio-testing (==1.31.0) ; extra == 'ci'
Requires-Dist: mock (==2.0.0) ; extra == 'ci'
Requires-Dist: moto ; extra == 'ci'
Requires-Dist: mypy (==0.790) ; extra == 'ci'
Requires-Dist: mypy-protobuf (==1.24) ; extra == 'ci'
Requires-Dist: avro (==1.10.0) ; extra == 'ci'
Requires-Dist: gcsfs ; extra == 'ci'
Requires-Dist: urllib3 (>=1.25.4) ; extra == 'ci'
Requires-Dist: pytest (==6.0.0) ; extra == 'ci'
Requires-Dist: pytest-lazy-fixture (==0.6.3) ; extra == 'ci'
Requires-Dist: pytest-timeout (==1.4.2) ; extra == 'ci'
Requires-Dist: pytest-ordering (==0.6.*) ; extra == 'ci'
Requires-Dist: pytest-mock (==1.10.4) ; extra == 'ci'
Requires-Dist: Sphinx ; extra == 'ci'
Requires-Dist: sphinx-rtd-theme ; extra == 'ci'
Requires-Dist: tenacity ; extra == 'ci'
Requires-Dist: adlfs (==0.5.9) ; extra == 'ci'
Requires-Dist: firebase-admin (==4.5.2) ; extra == 'ci'
Requires-Dist: google-cloud-datastore (==2.1.0) ; extra == 'ci'
Requires-Dist: pre-commit ; extra == 'ci'
Provides-Extra: dev
Requires-Dist: mypy-protobuf (==1.*) ; extra == 'dev'
Requires-Dist: grpcio-testing (==1.*) ; extra == 'dev'

<p align="center">
    <a href="https://feast.dev/">
      <img src="docs/assets/feast_logo.png" width="550">
    </a>
</p>
<br />

[![unit-tests](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml)
[![integration-tests](https://github.com/feast-dev/feast/actions/workflows/integration_tests.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/integration_tests.yml)
[![linter](https://github.com/feast-dev/feast/actions/workflows/linter.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/linter.yml)
[![Docs Latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://docs.feast.dev/)
[![Python API](https://img.shields.io/readthedocs/feast/master?label=Python%20API)](http://rtd.feast.dev/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue)](https://github.com/feast-dev/feast/blob/master/LICENSE)
[![GitHub Release](https://img.shields.io/github/v/release/feast-dev/feast.svg?style=flat&sort=semver&color=blue)](https://github.com/feast-dev/feast/releases)

## 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](https://docs.feast.dev/) for more information about the project.

## Architecture
<img src="https://i.imgur.com/IYUMF3Q.png" width="700">

The above architecture is the minimal Feast deployment. Want to run the full Feast on Kubernetes? Click [here](https://docs.feast.dev/feast-on-kubernetes/getting-started).

## Getting Started

### 1. Install Feast
```commandline
pip install feast
```

### 2. Create a feature repository
```commandline
feast init my_feature_repo
cd my_feature_repo
```

### 3. Register your feature definitions and set up your feature store
```commandline
feast apply
```

### 4. Build a training dataset
```python
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, 
    feature_refs = [
        '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)
```
```commandline
      event_timestamp  driver_id  driver_hourly_stats__conv_rate  driver_hourly_stats__acc_rate
  2021-04-12 08:12:10       1002                        0.497279                       0.357702
  2021-04-12 10:59:42       1001                        0.979747                       0.008166
  2021-04-12 15:01:12       1004                        0.151432                       0.551748
  2021-04-12 16:40:26       1003                        0.951506                       0.753572

```

### 5. Load feature values into your online store
```commandline
CURRENT_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S")
feast materialize-incremental $CURRENT_TIME
```

```commandline
Materializing feature view driver_hourly_stats from 2021-04-14 to 2021-04-15 done!
```

### 6. Read online features at low latency
```python
from pprint import pprint
from feast import FeatureStore

store = FeatureStore(repo_path=".")

feature_vector = store.get_online_features(
    feature_refs=[
        '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)
```
```json
{
    "driver_id": [1001],
    "driver_hourly_stats__conv_rate": [0.49274],
    "driver_hourly_stats__acc_rate": [0.92743],
    "driver_hourly_stats__avg_daily_trips": [72]
}
```

## Important resources

Please refer to the official documentation at [Documentation](https://docs.feast.dev/)
 * [Quickstart](https://docs.feast.dev/quickstart)
 * [Roadmap](https://docs.feast.dev/roadmap)
 * [Feast on Kubernetes](https://docs.feast.dev/feast-on-kubernetes/getting-started)
 * [Change Log](https://github.com/feast-dev/feast/blob/master/CHANGELOG.md)
 * [Slack (#Feast)](https://slack.feast.dev/)

## 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:
- [Contribution Process for Feast](https://docs.feast.dev/contributing/contributing)
- [Development Guide for Feast](https://docs.feast.dev/contributing/development-guide)
- [Development Guide for the Main Feast Repository](./CONTRIBUTING.md)

## Contributors ✨

Thanks goes to these incredible people:

<a href="https://github.com/feast-dev/feast/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=feast-dev/feast" />
</a>


