diff --git a/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py b/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py index 21ec2b52bc95e..799ca7d3f15c0 100644 --- a/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py +++ b/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py @@ -2,7 +2,11 @@ import os from typing import List, Optional -from ray.exceptions import ActorDiedError +try: + from ray.exceptions import ActorDiedError +except ImportError: + # For older versions of Ray + from ray.exceptions import RayActorError as ActorDiedError from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy from transformers import PreTrainedTokenizer