Skip to content

Commit 762de72

Browse files
author
Lukas Valatka
authored
Merge branch 'feast-dev:master' into feat/add-deduplicate-pushdown-to-clickhouse
2 parents 7579962 + ad32756 commit 762de72

File tree

29 files changed

+671
-58
lines changed

29 files changed

+671
-58
lines changed

docs/getting-started/components/compute-engine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ engines.
2525
| SnowflakeComputeEngine | Runs on Snowflake, designed for scalable feature generation using Snowflake SQL. | ✅ | |
2626
| LambdaComputeEngine | Runs on AWS Lambda, designed for serverless feature generation. | ✅ | |
2727
| FlinkComputeEngine | Runs on Apache Flink, designed for stream processing and real-time feature generation. | ❌ | |
28-
| RayComputeEngine | Runs on Ray, designed for distributed feature generation and machine learning workloads. | | |
28+
| RayComputeEngine | Runs on Ray, designed for distributed feature generation and machine learning workloads. | | |
2929
```
3030

3131
### Batch Engine

docs/getting-started/genai.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,24 @@ This integration enables:
104104
- Efficiently materializing features to vector databases
105105
- Scaling RAG applications to enterprise-level document repositories
106106

107+
### Scaling with Ray Integration
108+
109+
Feast integrates with Ray to enable distributed processing for RAG applications:
110+
111+
* **Ray Compute Engine**: Distributed feature computation using Ray's task and actor model
112+
* **Ray Offline Store**: Process large document collections and generate embeddings at scale
113+
* **Ray Batch Materialization**: Efficiently materialize features from offline to online stores
114+
* **Distributed Embedding Generation**: Scale embedding generation across multiple nodes
115+
116+
This integration enables:
117+
- Distributed processing of large document collections
118+
- Parallel embedding generation for millions of text chunks
119+
- Kubernetes-native scaling for RAG applications
120+
- Efficient resource utilization across multiple nodes
121+
- Production-ready distributed RAG pipelines
122+
123+
For detailed information on building distributed RAG applications with Feast and Ray, see [Feast + Ray: Distributed Processing for RAG Applications](https://feast.dev/blog/feast-ray-distributed-processing/).
124+
107125
## Model Context Protocol (MCP) Support
108126

109127
Feast supports the Model Context Protocol (MCP), which enables AI agents and applications to interact with your feature store through standardized MCP interfaces. This allows seamless integration with LLMs and AI agents for GenAI applications.
@@ -158,6 +176,7 @@ For more detailed information and examples:
158176
* [RAG Tutorial with Docling](../tutorials/rag-with-docling.md)
159177
* [RAG Fine Tuning with Feast and Milvus](../../examples/rag-retriever/README.md)
160178
* [Milvus Quickstart Example](https://github.com/feast-dev/feast/tree/master/examples/rag/milvus-quickstart.ipynb)
179+
* [Feast + Ray: Distributed Processing for RAG Applications](https://feast.dev/blog/feast-ray-distributed-processing/)
161180
* [MCP Feature Store Example](../../examples/mcp_feature_store/)
162181
* [MCP Feature Server Reference](../reference/feature-servers/mcp-feature-server.md)
163182
* [Spark Data Source](../reference/data-sources/spark.md)

docs/reference/compute-engine/ray.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
The Ray compute engine is a distributed compute implementation that leverages [Ray](https://www.ray.io/) for executing feature pipelines including transformations, aggregations, joins, and materializations. It provides scalable and efficient distributed processing for both `materialize()` and `get_historical_features()` operations.
44

5+
## Quick Start with Ray Template
6+
7+
### Ray RAG Template - Batch Embedding at Scale
8+
9+
For RAG (Retrieval-Augmented Generation) applications with distributed embedding generation:
10+
11+
```bash
12+
feast init -t ray_rag my_rag_project
13+
cd my_rag_project/feature_repo
14+
```
15+
16+
The Ray RAG template demonstrates:
17+
- **Parallel Embedding Generation**: Uses Ray compute engine to generate embeddings across multiple workers
18+
- **Vector Search Integration**: Works with Milvus for semantic similarity search
19+
- **Complete RAG Pipeline**: Data → Embeddings → Search workflow
20+
21+
The Ray compute engine automatically distributes the embedding generation across available workers, making it ideal for processing large datasets efficiently.
22+
523
## Overview
624

725
The Ray compute engine provides:
@@ -365,6 +383,8 @@ batch_engine:
365383

366384
### With Feature Transformations
367385

386+
#### On-Demand Transformations
387+
368388
```python
369389
from feast import FeatureView, Field
370390
from feast.types import Float64
@@ -385,4 +405,27 @@ features = store.get_historical_features(
385405
)
386406
```
387407

408+
#### Ray Native Transformations
409+
410+
For distributed transformations that leverage Ray's dataset and parallel processing capabilities, use `mode="ray"` in your `BatchFeatureView`:
411+
412+
```python
413+
# Feature view with Ray transformation mode
414+
document_embeddings_view = BatchFeatureView(
415+
name="document_embeddings",
416+
entities=[document],
417+
mode="ray", # Enable Ray native transformation
418+
ttl=timedelta(days=365),
419+
schema=[
420+
Field(name="document_id", dtype=String),
421+
Field(name="embedding", dtype=Array(Float32), vector_index=True),
422+
Field(name="movie_name", dtype=String),
423+
Field(name="movie_director", dtype=String),
424+
],
425+
source=movies_source,
426+
udf=generate_embeddings_ray_native,
427+
online=True,
428+
)
429+
```
430+
388431
For more information, see the [Ray documentation](https://docs.ray.io/en/latest/) and [Ray Data guide](https://docs.ray.io/en/latest/data/getting-started.html).

docs/reference/offline-stores/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ Please see [Offline Store](../../getting-started/components/offline-store.md) fo
4545
{% content-ref url="mssql.md" %}
4646
[mssql.md](mssql.md)
4747
{% endcontent-ref %}
48+
49+
{% content-ref url="ray.md" %}
50+
[ray.md](ray.md)
51+
{% endcontent-ref %}

docs/reference/offline-stores/overview.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,33 @@ The first three of these methods all return a `RetrievalJob` specific to an offl
2626
## Functionality Matrix
2727

2828
There are currently four core offline store implementations: `DaskOfflineStore`, `BigQueryOfflineStore`, `SnowflakeOfflineStore`, and `RedshiftOfflineStore`.
29-
There are several additional implementations contributed by the Feast community (`PostgreSQLOfflineStore`, `SparkOfflineStore`, and `TrinoOfflineStore`), which are not guaranteed to be stable or to match the functionality of the core implementations.
29+
There are several additional implementations contributed by the Feast community (`PostgreSQLOfflineStore`, `SparkOfflineStore`, `TrinoOfflineStore`, and `RayOfflineStore`), which are not guaranteed to be stable or to match the functionality of the core implementations.
3030
Details for each specific offline store, such as how to configure it in a `feature_store.yaml`, can be found [here](README.md).
3131

3232
Below is a matrix indicating which offline stores support which methods.
3333

34-
| | Dask | BigQuery | Snowflake | Redshift | Postgres | Spark | Trino | Couchbase |
35-
| :-------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
36-
| `get_historical_features` | yes | yes | yes | yes | yes | yes | yes | yes |
37-
| `pull_latest_from_table_or_query` | yes | yes | yes | yes | yes | yes | yes | yes |
38-
| `pull_all_from_table_or_query` | yes | yes | yes | yes | yes | yes | yes | yes |
39-
| `offline_write_batch` | yes | yes | yes | yes | no | no | no | no |
40-
| `write_logged_features` | yes | yes | yes | yes | no | no | no | no |
34+
|| | Dask | BigQuery | Snowflake | Redshift | Postgres | Spark | Trino | Couchbase | Ray |
35+
|| :-------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
36+
|| `get_historical_features` | yes | yes | yes | yes | yes | yes | yes | yes | yes |
37+
|| `pull_latest_from_table_or_query` | yes | yes | yes | yes | yes | yes | yes | yes | yes |
38+
|| `pull_all_from_table_or_query` | yes | yes | yes | yes | yes | yes | yes | yes | yes |
39+
|| `offline_write_batch` | yes | yes | yes | yes | no | no | no | no | yes |
40+
|| `write_logged_features` | yes | yes | yes | yes | no | no | no | no | yes |
4141

4242

4343
Below is a matrix indicating which `RetrievalJob`s support what functionality.
4444

45-
| | Dask | BigQuery | Snowflake | Redshift | Postgres | Spark | Trino | DuckDB | Couchbase |
46-
| --------------------------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
47-
| export to dataframe | yes | yes | yes | yes | yes | yes | yes | yes | yes |
48-
| export to arrow table | yes | yes | yes | yes | yes | yes | yes | yes | yes |
49-
| export to arrow batches | no | no | no | yes | no | no | no | no | no |
50-
| export to SQL | no | yes | yes | yes | yes | no | yes | no | yes |
51-
| export to data lake (S3, GCS, etc.) | no | no | yes | no | yes | no | no | no | yes |
52-
| export to data warehouse | no | yes | yes | yes | yes | no | no | no | yes |
53-
| export as Spark dataframe | no | no | yes | no | no | yes | no | no | no |
54-
| local execution of Python-based on-demand transforms | yes | yes | yes | yes | yes | no | yes | yes | yes |
55-
| remote execution of Python-based on-demand transforms | no | no | no | no | no | no | no | no | no |
56-
| persist results in the offline store | yes | yes | yes | yes | yes | yes | no | yes | yes |
57-
| preview the query plan before execution | yes | yes | yes | yes | yes | yes | yes | no | yes |
58-
| read partitioned data | yes | yes | yes | yes | yes | yes | yes | yes | yes |
45+
|| | Dask | BigQuery | Snowflake | Redshift | Postgres | Spark | Trino | DuckDB | Couchbase | Ray |
46+
|| --------------------------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
47+
|| export to dataframe | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |
48+
|| export to arrow table | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |
49+
|| export to arrow batches | no | no | no | yes | no | no | no | no | no | no |
50+
|| export to SQL | no | yes | yes | yes | yes | no | yes | no | yes | no |
51+
|| export to data lake (S3, GCS, etc.) | no | no | yes | no | yes | no | no | no | yes | yes |
52+
|| export to data warehouse | no | yes | yes | yes | yes | no | no | no | yes | no |
53+
|| export as Spark dataframe | no | no | yes | no | no | yes | no | no | no | no |
54+
|| local execution of Python-based on-demand transforms | yes | yes | yes | yes | yes | no | yes | yes | yes | yes |
55+
|| remote execution of Python-based on-demand transforms | no | no | no | no | no | no | no | no | no | no |
56+
|| persist results in the offline store | yes | yes | yes | yes | yes | yes | no | yes | yes | yes |
57+
|| preview the query plan before execution | yes | yes | yes | yes | yes | yes | yes | no | yes | yes |
58+
|| read partitioned data | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |

docs/reference/offline-stores/ray.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@
55
66
The Ray offline store is a data I/O implementation that leverages [Ray](https://www.ray.io/) for reading and writing data from various sources. It focuses on efficient data access operations, while complex feature computation is handled by the [Ray Compute Engine](../compute-engine/ray.md).
77

8+
## Quick Start with Ray Template
9+
10+
The easiest way to get started with Ray offline store is to use the built-in Ray template:
11+
12+
```bash
13+
feast init -t ray my_ray_project
14+
cd my_ray_project/feature_repo
15+
```
16+
17+
This template includes:
18+
- Pre-configured Ray offline store and compute engine setup
19+
- Sample feature definitions optimized for Ray processing
20+
- Demo workflow showcasing Ray capabilities
21+
- Resource settings for local development
22+
23+
The template provides a complete working example with sample datasets and demonstrates both Ray offline store data I/O operations and Ray compute engine distributed processing.
24+
825
## Overview
926

1027
The Ray offline store provides:

docs/reference/online-stores/mysql.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,28 @@ online_store:
2828
2929
The full set of configuration options is available in [MySQLOnlineStoreConfig](https://rtd.feast.dev/en/master/#feast.infra.online_stores.mysql_online_store.MySQLOnlineStoreConfig).
3030
31+
## Batch write mode
32+
By default, the MySQL online store performs row-by-row insert and commit for each feature record. While this ensures per-record atomicity, it can lead to significant overhead on write operations — especially on distributed SQL databases (for example, TiDB, which is MySQL-compatible and uses a consensus protocol).
33+
34+
To improve writing performance, you can enable batch write mode by setting `batch_write` to `true` and `batch_size`, which executes multiple insert queries in batches and commits them together per batch instead of committing each record individually.
35+
36+
{% code title="feature_store.yaml" %}
37+
```yaml
38+
project: my_feature_repo
39+
registry: data/registry.db
40+
provider: local
41+
online_store:
42+
type: mysql
43+
host: DB_HOST
44+
port: DB_PORT
45+
database: DB_NAME
46+
user: DB_USERNAME
47+
password: DB_PASSWORD
48+
batch_write: true
49+
batch_size: 100
50+
```
51+
{% endcode %}
52+
3153
## Functionality Matrix
3254

3355
The set of functionality supported by online stores is described in detail [here](overview.md#functionality).

infra/feast-operator/api/v1alpha1/featurestore_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ type FeastInitOptions struct {
111111

112112
// FeastCronJob defines a CronJob to execute against a Feature Store deployment.
113113
type FeastCronJob struct {
114+
// Annotations to be added to the CronJob metadata.
115+
Annotations map[string]string `json:"annotations,omitempty"`
116+
114117
// Specification of the desired behavior of a job.
115118
JobSpec *JobSpec `json:"jobSpec,omitempty"`
116119
ContainerConfigs *CronJobContainerConfigs `json:"containerConfigs,omitempty"`

infra/feast-operator/api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ spec:
8787
description: FeastCronJob defines a CronJob to execute against a Feature
8888
Store deployment.
8989
properties:
90+
annotations:
91+
additionalProperties:
92+
type: string
93+
description: Annotations to be added to the CronJob metadata.
94+
type: object
9095
concurrencyPolicy:
9196
description: Specifies how to treat concurrent executions of a
9297
Job.
@@ -4063,6 +4068,11 @@ spec:
40634068
description: FeastCronJob defines a CronJob to execute against
40644069
a Feature Store deployment.
40654070
properties:
4071+
annotations:
4072+
additionalProperties:
4073+
type: string
4074+
description: Annotations to be added to the CronJob metadata.
4075+
type: object
40664076
concurrencyPolicy:
40674077
description: Specifies how to treat concurrent executions
40684078
of a Job.

0 commit comments

Comments
 (0)