Skip to content

Commit

Permalink
[Bugfix] Ray 2.9.x doesn't expose available_resources_per_node (vllm-…
Browse files Browse the repository at this point in the history
…project#8767)

Signed-off-by: darthhexx <[email protected]>
  • Loading branch information
darthhexx authored and siddharth9820 committed Sep 30, 2024
1 parent a23722a commit 91a1949
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vllm/executor/ray_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@

try:
import ray
from ray._private.state import available_resources_per_node
from ray.util import placement_group_table
from ray.util.placement_group import PlacementGroup
try:
from ray._private.state import available_resources_per_node
except ImportError:
# Ray 2.9.x doesn't expose `available_resources_per_node`
from ray._private.state import state as _state
available_resources_per_node = _state._available_resources_per_node

class RayWorkerWrapper(WorkerWrapperBase):
"""Ray wrapper for vllm.worker.Worker, allowing Worker to be
Expand Down

0 comments on commit 91a1949

Please sign in to comment.