Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/sglang/srt/managers/eplb_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def __init__(self, model_runner: "ModelRunner"):
# Otherwise, the circular buffer will contain stale data. If the case is needed, it can be implemented.
assert (
self._server_args.eplb_rebalance_num_iterations
<= self._server_args.expert_distribution_recorder_buffer_size
), "eplb_rebalance_num_iterations must be less than expert_distribution_recorder_buffer_size"
>= self._server_args.expert_distribution_recorder_buffer_size
), "eplb_rebalance_num_iterations must be greater than expert_distribution_recorder_buffer_size"
Comment on lines +27 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The assertion logic self._server_args.eplb_rebalance_num_iterations >= self._server_args.expert_distribution_recorder_buffer_size correctly uses the '>=' operator.

However, the assertion message string "eplb_rebalance_num_iterations must be greater than expert_distribution_recorder_buffer_size" is slightly imprecise as it omits the "or equal to" part. For maximum clarity, especially in error messages, it's good practice for the message to exactly match the condition.

Could you update the message to reflect the 'greater than or equal to' condition accurately?

        ), "eplb_rebalance_num_iterations must be greater than or equal to expert_distribution_recorder_buffer_size"

Style Guide References


if not get_global_expert_distribution_recorder().recording:
get_global_expert_distribution_recorder().start_record()
Expand Down
Loading