Skip to content

Commit

Permalink
🎨 fmt TGIS related changes
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Runde <[email protected]>
  • Loading branch information
joerunde committed Mar 26, 2024
1 parent b4f9433 commit 0d8460a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
34 changes: 20 additions & 14 deletions vllm/entrypoints/grpc/grpc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,37 @@
import inspect
import time
import uuid
from typing import (Any, AsyncIterator, Dict, List, MutableSequence, Optional,
Tuple, Union)

import grpc
from grpc import aio, StatusCode

from typing import (Optional, AsyncIterator, Dict, MutableSequence, Any, Union,
Tuple, List)

from grpc import StatusCode, aio
from grpc._cython.cygrpc import AbortError
from grpc.aio import ServicerContext
from transformers import PreTrainedTokenizer, PreTrainedTokenizerFast

from vllm.logger import init_logger
from vllm import (AsyncLLMEngine, CompletionOutput, RequestOutput,
SamplingParams)
from vllm.config import ModelConfig
from vllm.entrypoints.grpc.pb import generation_pb2_grpc
from vllm.entrypoints.grpc.pb.generation_pb2 import (
BatchedTokenizeRequest, BatchedGenerationRequest, SingleGenerationRequest,
ModelInfoRequest, BatchedTokenizeResponse, TokenizeResponse,
ModelInfoResponse, GenerationResponse, BatchedGenerationResponse,
StopReason, TokenInfo, Parameters, DecodingMethod, ResponseOptions)
from vllm.entrypoints.grpc.pb.generation_pb2 import (BatchedGenerationRequest,
BatchedGenerationResponse,
BatchedTokenizeRequest,
BatchedTokenizeResponse,
DecodingMethod,
GenerationResponse,
ModelInfoRequest,
ModelInfoResponse,
Parameters,
ResponseOptions,
SingleGenerationRequest,
StopReason, TokenInfo,
TokenizeResponse)
from vllm.entrypoints.openai.serving_completion import merge_async_iterators
from vllm.logger import init_logger
from vllm.sequence import Logprob
from vllm.tgis_utils.logits_processors import TypicalLogitsWarperWrapper
from vllm.transformers_utils.tokenizer_group import BaseTokenizerGroup
from vllm.sequence import Logprob
from vllm import (AsyncLLMEngine, SamplingParams, RequestOutput,
CompletionOutput)

logger = init_logger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions vllm/entrypoints/openai/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
from prometheus_client import make_asgi_app

import vllm
from vllm.tgis_utils.args import add_tgis_args, postprocess_tgis_args
from vllm.entrypoints.grpc.grpc_server import start_grpc_server
from vllm.engine.arg_utils import AsyncEngineArgs
from vllm.engine.async_llm_engine import AsyncLLMEngine
from vllm.entrypoints.grpc.grpc_server import start_grpc_server
from vllm.entrypoints.openai.cli_args import make_arg_parser
from vllm.entrypoints.openai.protocol import (ChatCompletionRequest,
CompletionRequest, ErrorResponse)
from vllm.entrypoints.openai.serving_chat import OpenAIServingChat
from vllm.entrypoints.openai.serving_completion import OpenAIServingCompletion
from vllm.logger import init_logger
from vllm.tgis_utils.args import add_tgis_args, postprocess_tgis_args

TIMEOUT_KEEP_ALIVE = 5 # seconds

Expand Down

0 comments on commit 0d8460a

Please sign in to comment.