[BugFix] Avoid unnecessary Ray import warnings (#6079)

This commit is contained in:
Nick Hill
2024-07-03 14:09:40 +08:00
committed by GitHub
parent d18bab3587
commit d830656a97
3 changed files with 28 additions and 9 deletions
+5
View File
@@ -380,6 +380,11 @@ class AsyncLLMEngine:
"""Creates an async LLM engine from the engine arguments."""
# Create the engine configs.
engine_config = engine_args.create_engine_config()
if engine_args.engine_use_ray:
from vllm.executor import ray_utils
ray_utils.assert_ray_available()
distributed_executor_backend = (
engine_config.parallel_config.distributed_executor_backend)