[Fix] Seed raw tokenizer_path for smg-grpc-servicer in gRPC mode (#39105)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Shangming Cai
2026-09-12 14:41:15 +08:00
committed by GitHub
co-authored by Claude Fable 5
parent 56a4f47ca6
commit 981b947568
3 changed files with 21 additions and 1 deletions
+8
View File
@@ -16,6 +16,14 @@ suppress_noisy_warnings()
def run_server(server_args):
"""Run the server based on the gRPC flags and server_args.encoder_only."""
# smg-grpc-servicer reads the raw `server_args.tokenizer_path`, which
# resolution defaults into the stash but never writes back. Seed it here,
# before resolve_once() seals the record.
if (
server_args.smg_grpc_mode or server_args.grpc_mode
) and server_args.tokenizer_path is None:
server_args.tokenizer_path = server_args.model_path
# The flags dispatched on below are decided by resolution (`--grpc-mode`
# folds into `smg_grpc_mode`), and `prepare_server_args` returns raw input.
server_args.resolve_once()