From 70658bfeb52ab8996838a67fbc28902c4c3cbbab Mon Sep 17 00:00:00 2001 From: Ricardo-M-L <69202550+Ricardo-M-L@users.noreply.github.com> Date: Sun, 5 Apr 2026 08:20:16 +0800 Subject: [PATCH] fix: add missing f-string prefixes in warning and assert messages (#22067) Co-authored-by: yuj Co-authored-by: Claude Opus 4.6 (1M context) --- python/sglang/srt/mem_cache/memory_pool_host.py | 2 +- python/sglang/srt/models/phi4mm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/mem_cache/memory_pool_host.py b/python/sglang/srt/mem_cache/memory_pool_host.py index 1a9708c41..8410f8471 100644 --- a/python/sglang/srt/mem_cache/memory_pool_host.py +++ b/python/sglang/srt/mem_cache/memory_pool_host.py @@ -1201,7 +1201,7 @@ class MambaPoolHost(HostKVCache): "page_first", "page_first_direct", "layer_first", - ], "Unsupported layout: {layout}" + ], f"Unsupported layout: {layout}" self.layout = layout self.pin_memory = pin_memory diff --git a/python/sglang/srt/models/phi4mm.py b/python/sglang/srt/models/phi4mm.py index dcf9fca0a..eaa2b0a9d 100644 --- a/python/sglang/srt/models/phi4mm.py +++ b/python/sglang/srt/models/phi4mm.py @@ -529,7 +529,7 @@ class Phi4MMForCausalLM(nn.Module): param = params_dict.get(name) if param is None: if "lora" not in name: - logger.warning("Warning: {name} not found in model parameters") + logger.warning(f"Warning: {name} not found in model parameters") continue weight_loader = getattr(param, "weight_loader", default_weight_loader) weight_loader(param, loaded_weight)