[CI Bug] Fix pydantic_core._pydantic_core.ValidationError: Input should be a valid integer (#51179)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-08-05 20:57:47 +00:00
committed by GitHub
parent 65addac701
commit e76b71f659
@@ -172,7 +172,10 @@ class ModelArchConfigConvertorBase:
"moe_topk",
"moe_top_k",
]
return getattr_iter(self.hf_text_config, names, 0) or 0
num_experts_per_token = getattr_iter(self.hf_text_config, names, 0)
if isinstance(num_experts_per_token, list):
return max(num_experts_per_token, default=0)
return num_experts_per_token or 0
@final
@classmethod