Skip to content

Commit

Permalink
[misc] avoid circular import (#9765)
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao authored Oct 28, 2024
1 parent aa0addb commit 97b61bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from vllm.pooling_params import PoolingParams
from vllm.prompt_adapter.request import PromptAdapterRequest
from vllm.sampling_params import RequestOutputKind, SamplingParams
from vllm.spec_decode.metrics import SpecDecodeWorkerMetrics

if TYPE_CHECKING:
from vllm.inputs import SingletonInputs
Expand Down Expand Up @@ -1132,6 +1131,8 @@ class PoolerOutput(
"""The output from a pooling operation in the embedding model."""
outputs: List[EmbeddingSequenceGroupOutput]

# lazy import to avoid circular import
from vllm.spec_decode.metrics import SpecDecodeWorkerMetrics
spec_decode_worker_metrics: Optional[SpecDecodeWorkerMetrics] = None

def __getitem__(self, idx: int) -> EmbeddingSequenceGroupOutput:
Expand Down

0 comments on commit 97b61bf

Please sign in to comment.