You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/compute-engine/ray.md
+88Lines changed: 88 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ The Ray compute engine provides:
28
28
-**Lazy Evaluation**: Deferred execution for optimal performance
29
29
-**Resource Management**: Automatic scaling and resource optimization
30
30
-**Point-in-Time Joins**: Efficient temporal joins for historical feature retrieval
31
+
-**GPU Support**: Schedule transformation workers on GPU nodes via `num_gpus` config (all modes including KubeRay)
31
32
32
33
## Architecture
33
34
@@ -87,6 +88,9 @@ batch_engine:
87
88
| `enable_distributed_joins` | boolean | true | Enable distributed joins for large datasets |
88
89
| `staging_location` | string | None | Remote path for batch materialization jobs |
89
90
| `ray_conf` | dict | None | Ray configuration parameters (memory, CPU limits) |
91
+
| `num_gpus` | float | None | Number of GPUs to request per worker task. Requires GPU nodes in the Ray cluster. Fractional values (e.g. `0.5`) are supported. Supported in all modes including KubeRay. |
92
+
| `gpu_batch_format` | string | `"pandas"` | Batch format for `map_batches` when `num_gpus` is set. Use `"numpy"` or `"pyarrow"` for GPU-native libraries (e.g. cuDF, PyTorch). |
93
+
| `worker_task_options` | dict | None | Arbitrary Ray `.options()` kwargs applied to every worker task. See [Worker Resource Scheduling](#worker-resource-scheduling) for the full reference. |
# Ray compute engine provides built-in progress tracking
352
357
```
353
358
359
+
## Worker Resource Scheduling
360
+
361
+
`worker_task_options` is a passthrough dict of [Ray `.options()` kwargs](https://docs.ray.io/en/latest/ray-core/api/doc/ray.remote_function.RemoteFunction.options.html) applied to every worker task Feast dispatches. It pairs with `ray_conf` (cluster-level `ray.init` options) — `worker_task_options` targets individual worker tasks. Options are forwarded at two levels so Ray schedules correctly:
362
+
363
+
1. On the `@ray.remote` orchestration task via `.options(**worker_task_options)` — controls node selection.
364
+
2. Inside `map_batches` for the scheduling-relevant subset (`num_gpus`, `num_cpus`, `accelerator_type`, `resources`) — controls which nodes run the data workers.
365
+
366
+
This is supported across **all execution modes**: local, remote, and KubeRay.
| `memory` | int | Heap memory in **bytes** (e.g. `8589934592` for 8 GB). |
374
+
| `accelerator_type` | string | Pin tasks to a specific GPU model — `"A100"`, `"T4"`, `"V100"`, etc. Useful on KubeRay clusters with mixed GPU node pools. |
| `runtime_env` | dict | Per-task [Ray runtime environment](https://docs.ray.io/en/latest/ray-core/handling-dependencies.html) — `pip`, `conda`, `env_vars`, `working_dir`, etc. For KubeRay, use this to install packages on worker pods without rebuilding images. |
377
+
| `max_retries` | int | Task retry count on worker failure (default: 3). |
378
+
| `scheduling_strategy` | string | `"DEFAULT"`, `"SPREAD"`, or a placement group strategy. |
379
+
380
+
> For the full list of supported keys see the [Ray RemoteFunction.options() API docs](https://docs.ray.io/en/latest/ray-core/api/doc/ray.remote_function.RemoteFunction.options.html).
381
+
382
+
### GPU support
383
+
384
+
`num_gpus` is the only first-class GPU field because it also drives `gpu_batch_format` selection inside Feast. Set it directly rather than inside `worker_task_options`:
385
+
386
+
```yaml
387
+
batch_engine:
388
+
type: ray.engine
389
+
num_gpus: 1 # GPUs per task (fractional values like 0.5 supported)
390
+
gpu_batch_format: numpy # numpy/pyarrow for GPU-native libs (cuDF, PyTorch)
391
+
```
392
+
393
+
When `num_gpus` is set your transformation UDF runs on a GPU worker:
| `window_size_for_joins` | string | "1H" | Time window for distributed joins |
250
+
| `num_gpus` | float | None | GPUs per worker task. Supported in all modes. See [Worker Resource Scheduling](../compute-engine/ray.md#worker-resource-scheduling). |
251
+
| `gpu_batch_format` | string | `"pandas"` | Batch format for `map_batches` when `num_gpus` is set (`"numpy"` or `"pyarrow"` for GPU-native libs). |
252
+
| `worker_task_options` | dict | None | Arbitrary Ray `.options()` kwargs (num_cpus, memory, accelerator_type, resources, runtime_env, …). See [Worker Resource Scheduling](../compute-engine/ray.md#worker-resource-scheduling) for the full reference. |
249
253
250
254
#### Mode Detection Precedence
251
255
@@ -542,6 +546,12 @@ python your_feast_script.py
542
546
- Secure communication between client and Ray cluster
543
547
- Automatic cluster discovery
544
548
549
+
### GPU Support
550
+
551
+
The Ray offline store supports GPU scheduling via the `num_gpus` and `gpu_batch_format` config options. This works across all execution modes (local, remote, and KubeRay).
552
+
553
+
For full configuration details, examples, and KubeRay GPU setup, see the [Ray Compute Engine GPU Support](../compute-engine/ray.md#gpu-support) section.
554
+
545
555
### Data Source Validation
546
556
547
557
The Ray offline store validates data sources to ensure compatibility:
0 commit comments