Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Yu <[email protected]>
  • Loading branch information
comaniac committed Feb 7, 2025
1 parent a69bce6 commit 5b13820
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/ray/llm/_internal/batch/stages/vllm_engine_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import logging
import math
import time
import torch
import uuid
from functools import partial
from pydantic import BaseModel, Field, root_validator
from typing import Any, Dict, AsyncIterator, Optional, List, Tuple
from typing import TYPE_CHECKING, Any, Dict, AsyncIterator, Optional, List, Tuple

import ray
from ray.llm._internal.batch.stages.base import (
Expand All @@ -17,6 +16,9 @@
)
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy

if TYPE_CHECKING:
import torch

try:
import vllm
except ImportError:
Expand Down Expand Up @@ -61,7 +63,7 @@ class vLLMOutputData(BaseModel):
num_generated_tokens: int = Field(default=0)

# Embed fields.
embeddings: Optional[torch.Tensor] = None
embeddings: Optional["torch.Tensor"] = None

# Metrics fields.
metrics: Optional[Dict[str, Any]] = None
Expand Down

0 comments on commit 5b13820

Please sign in to comment.