Skip to content

Commit 398fdcf

Browse files
authored
docs: Adding blog post for Ray (#5705)
Signed-off-by: ntkathole <[email protected]>
1 parent be6e6c2 commit 398fdcf

File tree

8 files changed

+332
-23
lines changed

8 files changed

+332
-23
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:

0 commit comments

Comments
 (0)