From 41903287672cc001b3c702b8ae6916dbe1423225 Mon Sep 17 00:00:00 2001 From: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com> Date: Sat, 16 May 2026 09:25:14 +0800 Subject: [PATCH] Replace defensive getattr in pool_configurator with direct access (#25447) --- python/sglang/srt/model_executor/pool_configurator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/model_executor/pool_configurator.py b/python/sglang/srt/model_executor/pool_configurator.py index 5212f2c0f..8703a21ae 100644 --- a/python/sglang/srt/model_executor/pool_configurator.py +++ b/python/sglang/srt/model_executor/pool_configurator.py @@ -110,7 +110,7 @@ class DefaultPoolConfigurator(MemoryPoolConfigurator): scale_kv_cell_size_per_token_for_dflash, ) - draft_num_layers = getattr(mr, "dflash_draft_num_layers", None) + draft_num_layers = mr.dflash_draft_num_layers if ( draft_num_layers is not None and int(draft_num_layers) > 0