Skip to content

Commit

Permalink
[BugFix] Don't start a Ray cluster when not using Ray (vllm-project#5570
Browse files Browse the repository at this point in the history
)
  • Loading branch information
njhill authored and jimpang committed Jul 24, 2024
1 parent de9d711 commit 2ea6c27
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,14 @@ def __init__(
"required for multi-node inference")
backend = "ray"
elif ray_found:
from ray.util import get_current_placement_group
if self.placement_group or get_current_placement_group():
if self.placement_group:
backend = "ray"
else:
from ray import is_initialized as ray_is_initialized
if ray_is_initialized():
from ray.util import get_current_placement_group
if get_current_placement_group():
backend = "ray"
self.distributed_executor_backend = backend
logger.info("Defaulting to use %s for distributed inference",
backend)
Expand Down

0 comments on commit 2ea6c27

Please sign in to comment.