Skip to content

Revert "[EPLB][refactor] Modification of the initialization logic for expert_map and log2phy(depend on pr5285) (#5311)"#5506

Closed
zhangxinyuehfad wants to merge 1 commit intovllm-project:mainfrom
zhangxinyuehfad:zxy_fix_accuracy
Closed

Revert "[EPLB][refactor] Modification of the initialization logic for expert_map and log2phy(depend on pr5285) (#5311)"#5506
zhangxinyuehfad wants to merge 1 commit intovllm-project:mainfrom
zhangxinyuehfad:zxy_fix_accuracy

Conversation

@zhangxinyuehfad
Copy link
Copy Markdown
Collaborator

@zhangxinyuehfad zhangxinyuehfad commented Dec 30, 2025

This reverts commit f81cf69.

What this PR does / why we need it?

This reverts commit f81cf69 fix accuracy test for qwen3-30B:
https://github.com/vllm-project/vllm-ascend/actions/runs/20577361161/job/59119089426#logs

Does this PR introduce any user-facing change?

How was this patch tested?

accuracy test ok: https://github.com/vllm-project/vllm-ascend/actions/runs/20589189595?pr=5506

… expert_map and log2phy(depend on pr5285) (vllm-project#5311)"

This reverts commit f81cf69.

Signed-off-by: hfadzxy <starmoon_zhang@163.com>
@vllm-ascend-ci vllm-ascend-ci added ready-for-test start test by label for PR accuracy-test enable all accuracy test for PR labels Dec 30, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request appears to be a significant refactoring of the Expert Placement Load Balancing (EPLB) initialization logic, despite the 'Revert' in the title. The changes introduce a new ExpertLoadBalancer class to manage static expert maps from a file, and streamline the logic for both static and dynamic EPLB.

My review has identified a critical issue regarding inconsistent state management of local_num_experts in fused_moe.py, which could lead to runtime errors. Additionally, I've pointed out a couple of high-severity issues related to the use of random.choice in the log2phy map generation, which introduces non-determinism and can affect reproducibility. The corresponding tests for this functionality even mock the random choice mechanism, which is a strong indicator that this should be addressed in the production code as well.

Overall, the refactoring improves the structure and clarity of the EPLB logic. Addressing the identified issues will enhance the robustness and predictability of the implementation.

Comment thread vllm_ascend/ops/fused_moe/fused_moe.py
Comment thread vllm_ascend/eplb/core/eplb_utils.py
Comment thread vllm_ascend/ops/expert_load_balancer.py
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@vllm-ascend-ci vllm-ascend-ci removed the ready read for review label Dec 30, 2025
@wangxiyuan wangxiyuan changed the title Revert "[EPLB][refactor] Modification of the initialization logic for… Revert "[EPLB][refactor] Modification of the initialization logic for expert_map and log2phy(depend on pr5285) (#5311)" Dec 30, 2025
@zhangxinyuehfad
Copy link
Copy Markdown
Collaborator Author

fix accuracy test by #5521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accuracy-test enable all accuracy test for PR module:ops module:quantization module:tests ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants