"docs/vscode:/vscode.git/clone" did not exist on "e01ab595d897698c9a5fe9eaebd983eb3e23470a"
Unverified Commit ac9f9330 authored by Kevin Šuc's avatar Kevin Šuc Committed by GitHub
Browse files

Rename --exclude-log-deltas to --enable-log-deltas (#32020)


Signed-off-by: default avatarCatacomba <kevinsuc16@gmail.com>
parent 2d0c5b63
...@@ -1091,7 +1091,7 @@ async def init_app_state( ...@@ -1091,7 +1091,7 @@ async def init_app_state(
enable_prompt_tokens_details=args.enable_prompt_tokens_details, enable_prompt_tokens_details=args.enable_prompt_tokens_details,
enable_force_include_usage=args.enable_force_include_usage, enable_force_include_usage=args.enable_force_include_usage,
enable_log_outputs=args.enable_log_outputs, enable_log_outputs=args.enable_log_outputs,
exclude_log_deltas=args.exclude_log_deltas, enable_log_deltas=args.enable_log_deltas,
log_error_stack=args.log_error_stack, log_error_stack=args.log_error_stack,
) )
if "generate" in supported_tasks if "generate" in supported_tasks
......
...@@ -185,11 +185,12 @@ class FrontendArgs: ...@@ -185,11 +185,12 @@ class FrontendArgs:
"""Enable the `/tokenizer_info` endpoint. May expose chat """Enable the `/tokenizer_info` endpoint. May expose chat
templates and other tokenizer configuration.""" templates and other tokenizer configuration."""
enable_log_outputs: bool = False enable_log_outputs: bool = False
"""If True, log model outputs (generations). """If set to True, log model outputs (generations).
Requires --enable-log-requests.""" Requires --enable-log-requests."""
exclude_log_deltas: bool = False enable_log_deltas: bool = True
"""If True, model outputs will be logged once streaming is complete. Deltas """If set to False, output deltas will not be logged. Relevant only if
will not be logged. Requires --enable-log-outputs.""" --enable-log-outputs is set.
"""
h11_max_incomplete_event_size: int = H11_MAX_INCOMPLETE_EVENT_SIZE_DEFAULT h11_max_incomplete_event_size: int = H11_MAX_INCOMPLETE_EVENT_SIZE_DEFAULT
"""Maximum size (bytes) of an incomplete HTTP event (header or body) for """Maximum size (bytes) of an incomplete HTTP event (header or body) for
h11 parser. Helps mitigate header abuse. Default: 4194304 (4 MB).""" h11 parser. Helps mitigate header abuse. Default: 4194304 (4 MB)."""
...@@ -308,8 +309,6 @@ def validate_parsed_serve_args(args: argparse.Namespace): ...@@ -308,8 +309,6 @@ def validate_parsed_serve_args(args: argparse.Namespace):
# Enable auto tool needs a tool call parser to be valid # Enable auto tool needs a tool call parser to be valid
if args.enable_auto_tool_choice and not args.tool_call_parser: if args.enable_auto_tool_choice and not args.tool_call_parser:
raise TypeError("Error: --enable-auto-tool-choice requires --tool-call-parser") raise TypeError("Error: --enable-auto-tool-choice requires --tool-call-parser")
if args.exclude_log_deltas and not args.enable_log_outputs:
raise TypeError("Error: --exclude-log-deltas requires --enable-log-outputs")
if args.enable_log_outputs and not args.enable_log_requests: if args.enable_log_outputs and not args.enable_log_requests:
raise TypeError("Error: --enable-log-outputs requires --enable-log-requests") raise TypeError("Error: --enable-log-outputs requires --enable-log-requests")
......
...@@ -103,7 +103,7 @@ class OpenAIServingChat(OpenAIServing): ...@@ -103,7 +103,7 @@ class OpenAIServingChat(OpenAIServing):
enable_prompt_tokens_details: bool = False, enable_prompt_tokens_details: bool = False,
enable_force_include_usage: bool = False, enable_force_include_usage: bool = False,
enable_log_outputs: bool = False, enable_log_outputs: bool = False,
exclude_log_deltas: bool = False, enable_log_deltas: bool = True,
log_error_stack: bool = False, log_error_stack: bool = False,
default_chat_template_kwargs: dict[str, Any] | None = None, default_chat_template_kwargs: dict[str, Any] | None = None,
) -> None: ) -> None:
...@@ -121,7 +121,7 @@ class OpenAIServingChat(OpenAIServing): ...@@ -121,7 +121,7 @@ class OpenAIServingChat(OpenAIServing):
self.trust_request_chat_template = trust_request_chat_template self.trust_request_chat_template = trust_request_chat_template
self.default_chat_template_kwargs = default_chat_template_kwargs or {} self.default_chat_template_kwargs = default_chat_template_kwargs or {}
self.enable_log_outputs = enable_log_outputs self.enable_log_outputs = enable_log_outputs
self.exclude_log_deltas = exclude_log_deltas self.enable_log_deltas = enable_log_deltas
# set up logits processors # set up logits processors
self.logits_processors = self.model_config.logits_processors self.logits_processors = self.model_config.logits_processors
...@@ -1143,7 +1143,7 @@ class OpenAIServingChat(OpenAIServing): ...@@ -1143,7 +1143,7 @@ class OpenAIServingChat(OpenAIServing):
if tc.function and tc.function.arguments if tc.function and tc.function.arguments
) )
if delta_content and not self.exclude_log_deltas: if delta_content and self.enable_log_deltas:
self.request_logger.log_outputs( self.request_logger.log_outputs(
request_id=request_id, request_id=request_id,
outputs=delta_content, outputs=delta_content,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment