mindspore-ai / mindspore-ai/hyper-parallel
补全 hyper_parallel 测试覆盖率(trainer / trainer/utils / core/utils)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 53
- Forks
- 63
- Avg merge
- 23h 45m
- Merged PRs (30d)
- 63
Description
该问题是怎么引起的?
目的是补全 HyperParallel 的测试覆盖率,提升质量。
hyper_parallel/trainer/(含 trainer/utils/、trainer/callbacks/)和
hyper_parallel/core/utils/ 至今没有专门的 UT/ST 看护,已有的测试也无法兜底
这两个模块的对外契约。借这次集中补一波,把 trainer 入口路径(配置解析、
ParallelDims mesh 装配、callback dispatch)和 distributed-aware 工具函数
(chunk 数学、clip_grad 包装)都纳入看护范围。
重现步骤
非 bug 类 issue,无需复现。覆盖目标见 add-trainer-test 分支:
- UT:
tests/ut/trainer/与tests/ut/core/utils/,纯 CPU。 - ST:
tests/torch/trainer/test_parallel_dims.py与
tests/torch/core_utils/test_shape_utils.py,真实 4 卡 NPU。
报错信息
非 bug 类 issue,无运行期报错。预期成果:补齐用例后,上述模块的回归在 CI
单卡 UT 阶段就能拦下,不必等到完整训练才暴露。
schema_version: 1
source: gitcode
gitcode_repo: mindspore/hyper-parallel
gitcode_issue: 151
source_url: https://gitcode.com/mindspore/hyper-parallel/issues/151
Contributor guide
No contributing guide indexed for this repository
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 with the add-trainer-test branch and inspect tests/ut/trainer/, tests/ut/core/utils/, tests/torch/trainer/test_parallel_dims.py, and tests/torch/core_utils/test_shape_utils.py. Run the CPU unit tests first, then the real 4-card NPU tests if that environment is available. Done means coverage protects configuration parsing, ParallelDims mesh setup, callback dispatch, chunk math, and clip_grad utilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100