[Minor] more code cleanup (#4077)
This commit is contained in:
@@ -212,6 +212,7 @@ class DetokenizerManager:
|
||||
rids=recv_obj.rids,
|
||||
finished_reasons=recv_obj.finished_reasons,
|
||||
output_strs=output_strs,
|
||||
output_ids=None,
|
||||
prompt_tokens=recv_obj.prompt_tokens,
|
||||
completion_tokens=recv_obj.completion_tokens,
|
||||
cached_tokens=recv_obj.cached_tokens,
|
||||
|
||||
@@ -414,6 +414,12 @@ class BatchTokenIDOut:
|
||||
class BatchMultimodalDecodeReq:
|
||||
# The request id
|
||||
rids: List[str]
|
||||
finished_reasons: List[BaseFinishReason]
|
||||
|
||||
# Token counts
|
||||
prompt_tokens: List[int]
|
||||
completion_tokens: List[int]
|
||||
cached_tokens: List[int]
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -424,6 +430,8 @@ class BatchStrOut:
|
||||
finished_reasons: List[dict]
|
||||
# The output decoded strings
|
||||
output_strs: List[str]
|
||||
# The token ids
|
||||
output_ids: Optional[List[int]]
|
||||
|
||||
# Token counts
|
||||
prompt_tokens: List[int]
|
||||
@@ -453,6 +461,15 @@ class BatchStrOut:
|
||||
class BatchMultimodalOut:
|
||||
# The request id
|
||||
rids: List[str]
|
||||
# The finish reason
|
||||
finished_reasons: List[dict]
|
||||
# The outputs
|
||||
outputs: List[List[Dict]]
|
||||
|
||||
# Token counts
|
||||
prompt_tokens: List[int]
|
||||
completion_tokens: List[int]
|
||||
cached_tokens: List[int]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -1141,7 +1141,7 @@ async def print_exception_wrapper(func):
|
||||
|
||||
|
||||
class SignalHandler:
|
||||
def __init__(self, tokenizer_manager):
|
||||
def __init__(self, tokenizer_manager: TokenizerManager):
|
||||
self.tokenizer_manager = tokenizer_manager
|
||||
|
||||
def signal_handler(self, signum=None, frame=None):
|
||||
|
||||
Reference in New Issue
Block a user