Closed
【precision-test】同步 test_selector 上游并适配 torch_npu 改为 pytorch #18
tzing_tAdd on  Sep 29Closed at  Sep 30
tzing_tCollaborators
Sep 29 Create

当前现状

precision-test 内嵌的 test_selector Python 包基于旧版本上游,repo 注册表 key 为 torch_npu,TorchNpuAdapter 通过 GitCode(gitcode-pr)拉取 PR diff。

上游 test_selector 近期更新:

  • repos 注册表 key 由 torch_npu 改为 pytorch,--repo choices 同步更新
  • TorchNpuAdapter 改走 GitHub(--github-pr pytorch/pytorch#N),repo_name 改为 torch、product_code_prefix 改为 torch/
  • diff_parser 新增首次绑定豁免规则:纯插入块中绑定全新名字的惰性赋值不再记录锚点

precision-test 当前 src/ 与 dist/test_selector/ 仍为旧版本,action 入参契约(validators.js / action.yml)与上游 choices 不一致:用户传 repo-name: pytorch 会被 validators.js 拒绝,传 torch_npu 又会被 Python CLI choices 拒绝。

改进方向

将 test_selector 上游更新平移到 precision-test,并适配入参契约与文档:

  • 同步 src/ 与 dist/test_selector/ 的 Python 包至上游最新(含首次绑定豁免规则)
  • validators.js AVAILABLE_REPOS 将 torch_npu 替换为 pytorch
  • action.yml repo-name/github-pr/gitcode-pr 描述更新(gitcode-pr 保留为通用入口,与 github-pr 互斥)
  • README.md torch_npu 示例改为 pytorch + github-pr,差异对照表/环境变量表同步
  • 重新 ncc 打包 dist/index.js

影响范围

  • precision-test 插件仓(src/、dist/、validators.js、action.yml、README.md)
  • repo-name 合法值由 torch_npu 变为 pytorch,使用旧值的工作流需更新
  • 关联初始重构 issue #15

验收标准

likedislike
Ttzing_tCollaborators
Sep 29 Added label: ai-assisted
Ttzing_tCollaborators
Sep 29 Associated pull request
Ttzing_tCollaborators
Sep 30 changed custom state from 待办的 to 已完成
Ttzing_tCollaborators
Sep 30 Close issue