Unverified Commit fe386aca authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Automatically configure for EPLB-related args (#6628)

parent 14d1075f
......@@ -366,12 +366,28 @@ class ServerArgs:
"Pipeline parallelism is incompatible with overlap schedule."
)
if self.enable_eplb and (self.expert_distribution_recorder_mode is None):
self.expert_distribution_recorder_mode = "stat"
logger.info(
f"EPLB is enabled. The expert_distribution_recorder_mode is automatically set."
)
if (self.enable_eplb or (self.init_expert_location is not None)) and (
self.ep_dispatch_algorithm is None
):
self.ep_dispatch_algorithm = "static"
logger.info(
f"EPLB is enabled or init_expert_location is provided. ep_dispatch_algorithm is configured."
)
if self.enable_expert_distribution_metrics and (
self.expert_distribution_recorder_mode is None
):
self.expert_distribution_recorder_mode = "stat"
if self.expert_distribution_recorder_buffer_size is None:
# TODO pr-chain: enable this later
# if (x := self.eplb_rebalance_num_iterations) is not None:
# self.expert_distribution_recorder_buffer_size = x
if False:
pass
if (x := self.eplb_rebalance_num_iterations) is not None:
self.expert_distribution_recorder_buffer_size = x
elif self.expert_distribution_recorder_mode is not None:
self.expert_distribution_recorder_buffer_size = 1000
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment