nemo_curator.utils.ray_utils
nemo_curator.utils.ray_utils
Cluster-wide Ray helpers shared across backends and inference-server code.
Module Contents
Functions
Data
API
Return the cluster head node ID, lazily computed and cached.
Returns None if no head node is present in the cluster.
Check if a Ray node dict represents the cluster head.
Submit remote_fn(*args) once per alive Ray node and return results in submission order.
Convenience wrapper that submits via :func:submit_on_each_node and awaits the
refs with a single ray.get. For fan-outs across multiple submissions where
parallelism matters, call :func:submit_on_each_node directly and ray.get
the combined ref list once.
Submit remote_fn(*args) once per alive Ray node and return the ObjectRefs.
Each invocation is pinned to its node via NodeAffinitySchedulingStrategy(soft=False),
so the function runs on (and only on) the targeted node. Dead nodes are skipped; the
head node is also skipped when ignore_head_node is True. The caller is responsible
for awaiting the returned refs (typically via ray.get); use this when batching
multiple fan-outs into a single await preserves parallelism.