diff --git a/python/sglang/srt/eplb/expert_distribution.py b/python/sglang/srt/eplb/expert_distribution.py index 1859852af377..fad236735b53 100644 --- a/python/sglang/srt/eplb/expert_distribution.py +++ b/python/sglang/srt/eplb/expert_distribution.py @@ -415,7 +415,11 @@ def on_deepep_dispatch_normal( dict( layer_id=layer_idx, num_tokens_per_rank=num_tokens_per_rank.cpu().tolist(), - num_tokens_per_rdma_rank=num_tokens_per_rdma_rank.cpu().tolist(), + num_tokens_per_rdma_rank=( + num_tokens_per_rdma_rank.cpu().tolist() + if num_tokens_per_rdma_rank is not None + else None + ), num_tokens_per_expert=num_tokens_per_expert.cpu().tolist(), ) )