22
22
from vllm .v1 .engine .detokenizer import Detokenizer
23
23
from vllm .v1 .engine .processor import Processor
24
24
from vllm .v1 .executor .abstract import Executor
25
- from vllm .v1 .executor .ray_utils import initialize_ray_cluster
26
25
27
26
logger = init_logger (__name__ )
28
27
@@ -105,7 +104,7 @@ def from_engine_args(
105
104
else :
106
105
vllm_config = engine_config
107
106
108
- executor_class = cls . _get_executor_cls (vllm_config )
107
+ executor_class = Executor . get_class (vllm_config )
109
108
110
109
# Create the AsyncLLM.
111
110
return cls (
@@ -127,24 +126,6 @@ def shutdown(self):
127
126
if handler := getattr (self , "output_handler" , None ):
128
127
handler .cancel ()
129
128
130
- @classmethod
131
- def _get_executor_cls (cls , vllm_config : VllmConfig ) -> Type [Executor ]:
132
- executor_class : Type [Executor ]
133
- distributed_executor_backend = (
134
- vllm_config .parallel_config .distributed_executor_backend )
135
- if distributed_executor_backend == "ray" :
136
- initialize_ray_cluster (vllm_config .parallel_config )
137
- from vllm .v1 .executor .ray_executor import RayExecutor
138
- executor_class = RayExecutor
139
- elif distributed_executor_backend == "mp" :
140
- from vllm .v1 .executor .multiproc_executor import MultiprocExecutor
141
- executor_class = MultiprocExecutor
142
- else :
143
- assert (distributed_executor_backend is None )
144
- from vllm .v1 .executor .uniproc_executor import UniprocExecutor
145
- executor_class = UniprocExecutor
146
- return executor_class
147
-
148
129
async def add_request (
149
130
self ,
150
131
request_id : str ,
0 commit comments