From 29195aaa6e6c78cde1089df718adf9ec889bf641 Mon Sep 17 00:00:00 2001 From: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com> Date: Wed, 29 Oct 2025 06:20:55 +0800 Subject: [PATCH] Super tiny fix expert distribution dump error (#12271) --- python/sglang/srt/eplb/expert_distribution.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/eplb/expert_distribution.py b/python/sglang/srt/eplb/expert_distribution.py index 914b74b02..4535b8a08 100644 --- a/python/sglang/srt/eplb/expert_distribution.py +++ b/python/sglang/srt/eplb/expert_distribution.py @@ -20,6 +20,7 @@ import time from abc import ABC from collections import deque from contextlib import contextmanager +from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple, Type import einops @@ -868,7 +869,7 @@ class _StatAccumulator(_UtilizationRateAccumulatorMixin): def _dump_to_file(name, data): - save_dir = envs.SGLANG_EXPERT_DISTRIBUTION_RECORDER_DIR.get() + save_dir = Path(envs.SGLANG_EXPERT_DISTRIBUTION_RECORDER_DIR.get()) path_output = save_dir / name logger.info(f"Write expert distribution to {path_output}") if not save_dir.exists():