Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgshaw2-redhat committed Nov 1, 2024
1 parent 7c977d3 commit 3c14bdf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions vllm/entrypoints/llm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time
import itertools
import time
import warnings
from contextlib import contextmanager
from typing import (Any, ClassVar, Dict, List, Optional, Sequence, Tuple,
Expand Down Expand Up @@ -33,9 +33,9 @@
from vllm.utils import Counter, deprecate_args, deprecate_kwargs, is_list_of

if envs.VLLM_USE_V1:
from vllm.v1.engine.llm_engine import LLMEngine # type: ignore
from vllm.v1.engine.core import EngineCoreClient # type: ignore
from vllm.v1.engine.detokenizer import Detokenizer # type: ignore
from vllm.v1.engine.llm_engine import LLMEngine # type: ignore
from vllm.v1.engine.processor import Processor # type: ignore
else:
from vllm.engine.llm_engine import LLMEngine # type: ignore
Expand Down Expand Up @@ -918,8 +918,8 @@ def _add_request(
if envs.VLLM_USE_V1:
# 1) Convert input --> DetokenizerRequest / EngineCoreRequest.
detokenizer_req, engine_core_req = self.processor.process_inputs(
request_id, prompt, params, time.time(), lora_request,
None, prompt_adapter_request, priority)
request_id, prompt, params, time.time(), lora_request, None,
prompt_adapter_request, priority)

# 2) Add the request to Detokenizer (this process).
self.detokenizer.add_request(detokenizer_req)
Expand Down Expand Up @@ -969,9 +969,10 @@ def _run_engine_v1(
desc="Processed prompts",
dynamic_ncols=True,
)

# Run the engine.
request_outputs: List[Union[RequestOutput, EmbeddingRequestOutput]] = []
request_outputs: List[Union[RequestOutput,
EmbeddingRequestOutput]] = []
while self.detokenizer.has_unfinished_requests():
engine_core_outputs = self.engine_core_client.get_output()
outputs = self.detokenizer.step(engine_core_outputs)
Expand All @@ -988,7 +989,6 @@ def _run_engine_v1(
# its previous requests.
return sorted(outputs, key=lambda x: int(x.request_id))


def _run_engine(
self, *, use_tqdm: bool
) -> List[Union[RequestOutput, EmbeddingRequestOutput]]:
Expand Down
2 changes: 1 addition & 1 deletion vllm/v1/engine/async_llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from vllm.sampling_params import SamplingParams
from vllm.usage.usage_lib import UsageContext
from vllm.v1.engine.async_stream import AsyncStream
from vllm.v1.engine.detokenizer import Detokenizer
from vllm.v1.engine.core import EngineCoreClient
from vllm.v1.engine.detokenizer import Detokenizer
from vllm.v1.engine.processor import Processor
from vllm.v1.engine.protocol import LLMEngineProtocol
from vllm.v1.executor.gpu_executor import GPUExecutor
Expand Down
2 changes: 1 addition & 1 deletion vllm/v1/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from vllm.prompt_adapter.request import PromptAdapterRequest
from vllm.sampling_params import SamplingParams
from vllm.usage.usage_lib import UsageContext
from vllm.v1.engine.detokenizer import Detokenizer
from vllm.v1.engine.core import EngineCore
from vllm.v1.engine.detokenizer import Detokenizer
from vllm.v1.engine.processor import Processor
from vllm.v1.engine.protocol import LLMEngineProtocol
from vllm.v1.executor.gpu_executor import GPUExecutor
Expand Down

0 comments on commit 3c14bdf

Please sign in to comment.