执行摘要
- 一句话:删除遗留测试目录并更新 NPU CI 路径
- 推荐动作:建议合并。这是一个积极的维护行为,可以快速通过。后续可检查是否还有其他残留的旧路径引用。
功能与动机
PR body 说明:Remove test/srt/ascend/ — the test file was only listed under not_in_ci in the legacy test/srt/run_suite.py and was never run in CI. NPU tests now live in test/registered/ascend/. Remove test/srt/configs/ — these YAML configs were left behind when experiment_runner.py and its workflow were deleted. Fix pr-test-npu.yml change-detection path from test/srt/ascend/to test/registered/ascend/ so that changes to NPU tests correctly trigger the CI workflow.
实现拆解
- 删除 test/srt/ascend/test_embed_interpolate_unittest.py(104 行 NPU 测试文件)。
- 删除 test/srt/configs/ 下 5 个 YAML 配置文件:deepseek_v3.yaml, deepseek_v3_long_context.yaml, llama_405b.yaml, random_config.yaml, random_flashinfer_vs_triton_config.yaml, sharegpt_config.yaml。
- 修改 test/srt/run_suite.py,从 not_in_ci 列表中移除对已删除测试文件的引用。
- 修改 .github/workflows/pr-test-npu.yml,将路径 glob 从 test/srt/ascend/改为 test/registered/ascend/,以确保 NPU 测试变更能正确触发 CI 工作流。
关键文件:
test/srt/ascend/test_embed_interpolate_unittest.py(模块 NPU 测试;类别 test;类型 deletion;符号 unpack, TestEmbedInterpolate, setUpClass, tearDownClass): 该文件仅存在于旧版 CI 的 not_in_ci 列表,从未实际运行,NPU 测试已迁移至 test/registered/ascend/,故删除。
test/srt/configs/deepseek_v3.yaml(模块 基准配置;类别 config;类型 deletion): 该配置是 experiment_runner.py 的遗留产物,workflow 已删除,故移除。
test/srt/run_suite.py(模块 测试套件;类别 test;类型 test-coverage): 移除对已删除测试文件的引用(从 not_in_ci 列表中删除)。
.github/workflows/pr-test-npu.yml(模块 CI 工作流;类别 infra;类型 infrastructure): 将路径检测从旧路径 test/srt/ascend/更新为 test/registered/ascend/,以确保 NPU 测试变更能正确触发 CI。
关键符号:unpack, TestEmbedInterpolate.setUpClass, TestEmbedInterpolate.test_embed_interpolate
评论区精华
无实质性讨论。仅有 gemini-code-assist[bot] 的自动审查评论,表示没有反馈。
风险与影响
- 风险:风险较低。被删除文件均已被确认无其他引用,且相关测试已迁移到新位置。CI 路径更新确保新测试能够触发。唯一轻微风险是如果存在未发现的引用,但 PR 作者已声明做了验证。
- 影响:对最终用户无影响。对开发者而言,仓库减少混乱,构建时间略有缩短(删除无用文件)。CI 流程的 NPU 测试触发更准确。
- 风险标记:删除遗留文件, CI 路径修复
关联脉络
- PR #19541 [NPU] fix some npu error with OffloaderV2: 该 PR 将 NPU 测试迁移至 test/registered/ascend/,本 PR 清理旧的 test/srt/ascend 文件,两者是同一测试迁移过程的不同阶段。
参与讨论