This directory (vllm_omni/distributed/ray_utils) contains utilities for distributed execution in vllm-omni, supporting both **Ray** and **Multiprocessing** backends.
## 1. Ray Utils
The `ray_utils` module provides helper functions for managing Ray clusters and actors, which is essential for:
* **Multi-node deployment**: Running pipeline stages across different physical machines.
When running on Ray, the system automatically adapts its communication strategy:
***Cross-Node**: Recommended to use `MooncakeConnector` (requires separate configuration).
***Same-Node**: Can still use `SharedMemoryConnector` for efficiency, or Ray's native object store (plasma).
***SHM threshold default differs**: when `worker_backend="ray"`, the SharedMemoryConnector default threshold is set to `sys.maxsize`, which forces payloads to go inline (no SHM). Override `shm_threshold_bytes` in the connector config if you want SHM for Ray runs.
### 1.4 Internal Helpers
***`initialize_ray_cluster`**: Connects to an existing Ray cluster or starts a local one.
## 2. Troubleshooting
***Connection Issues**: Ensure the Ray head node is accessible and ports (default 6399 in this example) are open.
***Version Mismatch**: Ensure all nodes run the same version of Ray and Python.