modelscope / modelscope/ms-swift
moe_router_load_balancing_type has inconsistent type declarations across different code locations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Checklist / 检查清单
- I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
moe_router_load_balancing_type has inconsistent type declarations across different code locations
How to Reproduce / 如何复现
In megatron_args, list
https://github.com/modelscope/ms-swift/blob/f0aecc0a71c5c9cc8d221440f1ff1354c7ba6e82/swift/megatron/arguments/megatron_args.py#L511
In model_config, string
https://github.com/modelscope/ms-swift/blob/f0aecc0a71c5c9cc8d221440f1ff1354c7ba6e82/swift/megatron/model/model_config.py#L175-L176
Additional Information / 补充信息
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the moe_router_load_balancing_type declarations in swift/megatron/arguments/megatron_args.py around line 511 and swift/megatron/model/model_config.py around lines 175-176. Search for other references to this option and determine which type the surrounding code expects. Done means the declarations are consistent and the relevant checks or tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100