@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 400b8289f7
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 06:45 UTC

Add pyarrow to dependencies & Print warning on Ray import error (#1094)

Woosuk Kwon committed Sep 18, 2023 at 22:36 UTC 400b8289f744c4b8cdaa2c35268192c23e90d26c
2 files changed +8 -1
requirements.txt
+1
@@ -2,6 +2,7 @@ ninja # For faster builds.
2 psutil
3 ray >= 2.5.1
4 pandas # Required for Ray data.
5 +pyarrow # Required for Ray data.
6 sentencepiece # Required for LLaMA tokenizer.
7 numpy
8 torch >= 2.0.0
vllm/engine/ray_utils.py
+7 -1
@@ -2,6 +2,9 @@ import socket
2 from typing import Optional, Tuple, TYPE_CHECKING
3
4 from vllm.config import ParallelConfig
5 +from vllm.logger import init_logger
6 +
7 +logger = init_logger(__name__)
8
9 try:
10 import ray
@@ -28,7 +31,10 @@ try:
31 executor = getattr(self, method)
32 return executor(*args, **kwargs)
33
31 -except ImportError:
34 +except ImportError as e:
35 + logger.warning(f"Failed to import Ray with {e!r}. "
36 + "For distributed inference, please install Ray with "
37 + "`pip install ray pandas pyarrow`.")
38 ray = None
39 TorchDistributedWorker = None
40 RayWorker = None # pylint: disable=invalid-name