Add pyarrow to dependencies & Print warning on Ray import error (#1094)
This commit is contained in:
parent
c1026311b5
commit
400b8289f7
@ -2,6 +2,7 @@ ninja # For faster builds.
|
|||||||
psutil
|
psutil
|
||||||
ray >= 2.5.1
|
ray >= 2.5.1
|
||||||
pandas # Required for Ray data.
|
pandas # Required for Ray data.
|
||||||
|
pyarrow # Required for Ray data.
|
||||||
sentencepiece # Required for LLaMA tokenizer.
|
sentencepiece # Required for LLaMA tokenizer.
|
||||||
numpy
|
numpy
|
||||||
torch >= 2.0.0
|
torch >= 2.0.0
|
||||||
|
|||||||
@ -2,6 +2,9 @@ import socket
|
|||||||
from typing import Optional, Tuple, TYPE_CHECKING
|
from typing import Optional, Tuple, TYPE_CHECKING
|
||||||
|
|
||||||
from vllm.config import ParallelConfig
|
from vllm.config import ParallelConfig
|
||||||
|
from vllm.logger import init_logger
|
||||||
|
|
||||||
|
logger = init_logger(__name__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import ray
|
import ray
|
||||||
@ -28,7 +31,10 @@ try:
|
|||||||
executor = getattr(self, method)
|
executor = getattr(self, method)
|
||||||
return executor(*args, **kwargs)
|
return executor(*args, **kwargs)
|
||||||
|
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
|
logger.warning(f"Failed to import Ray with {e!r}. "
|
||||||
|
"For distributed inference, please install Ray with "
|
||||||
|
"`pip install ray pandas pyarrow`.")
|
||||||
ray = None
|
ray = None
|
||||||
TorchDistributedWorker = None
|
TorchDistributedWorker = None
|
||||||
RayWorker = None # pylint: disable=invalid-name
|
RayWorker = None # pylint: disable=invalid-name
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user