Skip to content

Commit e578582

Browse files
authored
Merge branch 'feast-dev:master' into master
2 parents de3252b + 9ba9ded commit e578582

48 files changed

Lines changed: 1134 additions & 893 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717
[![License](https://img.shields.io/badge/License-Apache%202.0-blue)](https://github.com/feast-dev/feast/blob/master/LICENSE)
1818
[![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)
1919

20+
2021
## Join us on Slack!
2122
👋👋👋 [Come say hi on Slack!](https://communityinviter.com/apps/feastopensource/feast-the-open-source-feature-store)
2223

2324
[Check out our DeepWiki!](https://deepwiki.com/feast-dev/feast)
2425

2526
## Overview
27+
<a href="https://trendshift.io/repositories/8046" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8046" alt="feast-dev%2Ffeast | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
2628

2729
Feast (**Fea**ture **St**ore) is an open source feature store for machine learning. Feast is the fastest path to manage existing infrastructure to productionize analytic data for model training and online inference.
2830

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Batch Materialization Engine
22

3+
Note: The materialization engine is not constructed via unified compute engine interface.
4+
35
A batch materialization engine is a component of Feast that's responsible for moving data from the offline store into the online store.
46

5-
A materialization engine abstracts over specific technologies or frameworks that are used to materialize data. It allows users to use a pure local serialized approach (which is the default LocalMaterializationEngine), or delegates the materialization to seperate components (e.g. AWS Lambda, as implemented by the the LambdaMaterializaionEngine).
7+
A materialization engine abstracts over specific technologies or frameworks that are used to materialize data. It allows users to use a pure local serialized approach (which is the default LocalComputeEngine), or delegates the materialization to seperate components (e.g. AWS Lambda, as implemented by the the LambdaComputeEngine).
68

7-
If the built-in engines are not sufficient, you can create your own custom materialization engine. Please see [this guide](../../how-to-guides/customizing-feast/creating-a-custom-materialization-engine.md) for more details.
9+
If the built-in engines are not sufficient, you can create your own custom materialization engine. Please see [this guide](../../how-to-guides/customizing-feast/creating-a-custom-compute-engine.md) for more details.
810

911
Please see [feature\_store.yaml](../../reference/feature-repository/feature-store-yaml.md#overview) for configuring engines.

docs/how-to-guides/customizing-feast/creating-a-custom-materialization-engine.md renamed to docs/how-to-guides/customizing-feast/creating-a-custom-compute-engine.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# Adding a custom batch materialization engine
1+
# Adding a custom compute engine
22

33
### Overview
44

5-
Feast batch materialization operations (`materialize` and `materialize-incremental`) execute through a `BatchMaterializationEngine`.
5+
Feast batch materialization operations (`materialize` and `materialize-incremental`), and get_historical_features are executed through a `ComputeEngine`.
66

7-
Custom batch materialization engines allow Feast users to extend Feast to customize the materialization process. Examples include:
7+
Custom batch compute engines allow Feast users to extend Feast to customize the materialization and get_historical_features process. Examples include:
88

99
* Setting up custom materialization-specific infrastructure during `feast apply` (e.g. setting up Spark clusters or Lambda Functions)
1010
* Launching custom batch ingestion (materialization) jobs (Spark, Beam, AWS Lambda)
1111
* Tearing down custom materialization-specific infrastructure during `feast teardown` (e.g. tearing down Spark clusters, or deleting Lambda Functions)
1212

13-
Feast comes with built-in materialization engines, e.g, `LocalMaterializationEngine`, and an experimental `LambdaMaterializationEngine`. However, users can develop their own materialization engines by creating a class that implements the contract in the [BatchMaterializationEngine class](https://github.com/feast-dev/feast/blob/6d7b38a39024b7301c499c20cf4e7aef6137c47c/sdk/python/feast/infra/materialization/batch\_materialization\_engine.py#L72).
13+
Feast comes with built-in materialization engines, e.g, `LocalComputeEngine`, and an experimental `LambdaComputeEngine`. However, users can develop their own compute engines by creating a class that implements the contract in the [ComputeEngine class](https://github.com/feast-dev/feast/blob/85514edbb181df083e6a0d24672c00f0624dcaa3/sdk/python/feast/infra/compute_engines/base.py#L19).
1414

1515
### Guide
1616

17-
The fastest way to add custom logic to Feast is to extend an existing materialization engine. The most generic engine is the `LocalMaterializationEngine` which contains no cloud-specific logic. The guide that follows will extend the `LocalProvider` with operations that print text to the console. It is up to you as a developer to add your custom code to the engine methods, but the guide below will provide the necessary scaffolding to get you started.
17+
The fastest way to add custom logic to Feast is to implement the ComputeEngine. The guide that follows will extend the `LocalProvider` with operations that print text to the console. It is up to you as a developer to add your custom code to the engine methods, but the guide below will provide the necessary scaffolding to get you started.
1818

1919
#### Step 1: Define an Engine class
2020

21-
The first step is to define a custom materialization engine class. We've created the `MyCustomEngine` below. This python file can be placed in your `feature_repo` directory if you're following the Quickstart guide.
21+
The first step is to define a custom compute engine class. We've created the `MyCustomEngine` below. This python file can be placed in your `feature_repo` directory if you're following the Quickstart guide.
2222

2323
```python
2424
from typing import List, Sequence, Union
@@ -27,14 +27,16 @@ from feast.entity import Entity
2727
from feast.feature_view import FeatureView
2828
from feast.batch_feature_view import BatchFeatureView
2929
from feast.stream_feature_view import StreamFeatureView
30-
from feast.infra.materialization.local_engine import LocalMaterializationJob, LocalMaterializationEngine
30+
from feast.infra.common.retrieval_task import HistoricalRetrievalTask
31+
from feast.infra.compute_engines.local.job import LocalMaterializationJob
32+
from feast.infra.compute_engines.base import ComputeEngine
3133
from feast.infra.common.materialization_job import MaterializationTask
32-
from feast.infra.offline_stores.offline_store import OfflineStore
34+
from feast.infra.offline_stores.offline_store import OfflineStore, RetrievalJob
3335
from feast.infra.online_stores.online_store import OnlineStore
3436
from feast.repo_config import RepoConfig
3537

3638

37-
class MyCustomEngine(LocalMaterializationEngine):
39+
class MyCustomEngine(ComputeEngine):
3840
def __init__(
3941
self,
4042
*,
@@ -80,9 +82,13 @@ class MyCustomEngine(LocalMaterializationEngine):
8082
)
8183
for task in tasks
8284
]
85+
86+
def get_historical_features(self, task: HistoricalRetrievalTask) -> RetrievalJob:
87+
raise NotImplementedError
8388
```
8489

85-
Notice how in the above engine we have only overwritten two of the methods on the `LocalMaterializatinEngine`, namely `update` and `materialize`. These two methods are convenient to replace if you are planning to launch custom batch jobs.
90+
Notice how in the above engine we have only overwritten two of the methods on the `LocalComputeEngine`, namely `update` and `materialize`. These two methods are convenient to replace if you are planning to launch custom batch jobs.
91+
If you want to use the compute to execute the get_historical_features method, you will need to implement the `get_historical_features` method as well.
8692

8793
#### Step 2: Configuring Feast to use the engine
8894

docs/reference/data-sources/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Below is a matrix indicating which data sources support which types.
2828
| `float64` | yes | yes | yes | yes | yes | yes | yes | yes |
2929
| `bool` | yes | yes | yes | yes | yes | yes | yes | yes |
3030
| `timestamp` | yes | yes | yes | yes | yes | yes | yes | yes |
31-
| array types | yes | yes | yes | no | yes | yes | no | no |
31+
| array types | yes | yes | yes | no | yes | yes | yes | no |

docs/reference/data-sources/trino.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These can be specified either by a table reference or a SQL query.
88
## Disclaimer
99

1010
The Trino data source does not achieve full test coverage.
11-
Please do not assume complete stability.
11+
Please do not assume complete stability.
1212

1313
## Examples
1414

@@ -30,5 +30,5 @@ The full set of configuration options is available [here](https://rtd.feast.dev/
3030

3131
## Supported Types
3232

33-
Trino data sources support all eight primitive types, but currently do not support array types.
33+
Trino data sources support all eight primitive types and their corresponding array types.
3434
For a comparison against other batch data sources, please see [here](overview.md#functionality-matrix).

infra/templates/README.md.jinja2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
[![License](https://img.shields.io/badge/License-Apache%202.0-blue)](https://github.com/feast-dev/feast/blob/master/LICENSE)
1616
[![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)
1717

18+
1819
## Join us on Slack!
1920
👋👋👋 [Come say hi on Slack!](https://communityinviter.com/apps/feastopensource/feast-the-open-source-feature-store)
2021

2122
[Check out our DeepWiki!](https://deepwiki.com/feast-dev/feast)
2223

2324
## Overview
25+
<a href="https://trendshift.io/repositories/8046" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8046" alt="feast-dev%2Ffeast | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
2426

2527
Feast (**Fea**ture **St**ore) is an open source feature store for machine learning. Feast is the fastest path to manage existing infrastructure to productionize analytic data for model training and online inference.
2628

sdk/python/feast/batch_feature_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(
7979
ttl: Optional[timedelta] = None,
8080
tags: Optional[Dict[str, str]] = None,
8181
online: bool = False,
82-
offline: bool = True,
82+
offline: bool = False,
8383
description: str = "",
8484
owner: str = "",
8585
schema: Optional[List[Field]] = None,

sdk/python/feast/infra/common/materialization_job.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class MaterializationTask:
2020
feature_view: Union[BatchFeatureView, StreamFeatureView, FeatureView]
2121
start_time: datetime
2222
end_time: datetime
23-
tqdm_builder: Callable[[int], tqdm]
23+
only_latest: bool = True
24+
tqdm_builder: Union[None, Callable[[int], tqdm]] = None
2425

2526

2627
class MaterializationJobStatus(enum.Enum):

sdk/python/feast/infra/materialization/aws_lambda/Dockerfile renamed to sdk/python/feast/infra/compute_engines/aws_lambda/Dockerfile

File renamed without changes.

sdk/python/feast/infra/materialization/aws_lambda/app.py renamed to sdk/python/feast/infra/compute_engines/aws_lambda/app.py

File renamed without changes.

0 commit comments

Comments
 (0)