vllm.ray.lazy_utils is_in_ray_actor ¶ is_in_ray_actor() Check if we are in a Ray actor. Source code in vllm/ray/lazy_utils.py 14 15 16 17 18 19 20 21 22def is_in_ray_actor(): """Check if we are in a Ray actor.""" try: import ray return (ray.is_initialized() and ray.get_runtime_context().get_actor_id() is not None) except ImportError: return False is_ray_initialized ¶ is_ray_initialized() Check if Ray is initialized. Source code in vllm/ray/lazy_utils.py 5 6 7 8 9 10 11def is_ray_initialized(): """Check if Ray is initialized.""" try: import ray return ray.is_initialized() except ImportError: return False