[API Compatibility] select_scatter/sgn/signbit/slice_scatter/take/tensordot/tril_indices/triu_indices/vander/logaddexp/logspace/moveaxis/nan_to_num/nanmean/nansum/masked_fill/addmv/addr/fix/histc/trunc Edit By AI Agent#79215
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 40/48 通过
2 失败详情🔴 Static-Check / Test — PR问题:API annotation需Typing审批(置信度: 高)
根因详情: 关键日志: 修复建议:
修复建议摘要: 获取Typing组审批或修正API注解 关联变更: 链接: 查看日志 🔴 Linux-XPU / Test — PR问题:vander兼容性断言失败(置信度: 高)
失败用例:
根因详情: 关键日志: 修复建议:
修复建议摘要: 修正或条件处理XPU vander兼容测试 关联变更: 链接: 查看日志 🔴 Check approval — 需要 Approval(置信度: 高)
根因详情: 关键日志: 修复建议:
修复建议摘要: 请通过人工审批 关联变更: 无 链接: 查看日志 🔴 Fleet Unit test (single card) — 不稳定问题:Fleet单卡测试超时(置信度: 中)
根因详情: 关键日志: 修复建议:
修复建议摘要: 先rerun,复现后拆分或延长预算 关联变更: 未发现直接关联;失败发生在 Fleet 单卡测试流程。 链接: 查看日志 🔴 Linux-DCU / Test — PR问题:api兼容测试重跑失败(置信度: 中)
失败用例:
根因详情: 关键日志: 修复建议:
修复建议摘要: DCU复现api兼容测试并修正对应分支 关联变更: 链接: 查看日志 🔴 CE-Framework / Infer — 环境问题:urllib连接阶段失败(置信度: 中)
失败用例:
根因详情: 关键日志: 修复建议:
修复建议摘要: 环境问题,请rerun 关联变更: 未发现与本 PR Python API 兼容性改动的直接代码关联。 链接: 查看日志 |
…nsum/sgn/signbit/slice_scatter/take/tensordot/tril_indices/triu_indices/trunc/vander Edit By AI Agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e_scatter Edit By AI Agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dices/crow_indices Edit By AI Agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #79215 +/- ##
==========================================
Coverage ? 98.77%
==========================================
Files ? 7
Lines ? 163
Branches ? 0
==========================================
Hits ? 161
Misses ? 2
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- logspace: add requires_grad support in PIR mode - slice_scatter: fix overload signature default values Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ns Edit By AI Agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-06-08 14:01:18
📋 Review 摘要
PR 概述:为一批 PyTorch 兼容 API 增加别名、out/device/requires_grad 参数和 Tensor 方法。
变更范围:python/paddle 公开 API 导出、Tensor patch、API 兼容测试。
影响面 Tag:[User Experience]
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🔴 兼容性 | python/paddle/tensor/manipulation.py:8707 |
slice_scatter 删除旧有 name 参数,已有按关键字传 name 的 Paddle 调用会 TypeError |
| 🟡 建议 | python/paddle/__init__.py:585 |
新增顶层 API/别名未同步 paddle.__all__,from paddle import * 和 API 枚举会漏掉它们 |
历史 Findings 修复情况
| Finding | 问题 | 状态 |
|---|---|---|
| F1 | f_50abb0d1 |
|
| F2 | f_4de13851 |
|
| F3 | f_212459aa |
|
| F4 | f_8a52dab3 |
|
| F5 | f_a2eb0e7e |
|
| F6 | f_df2d2f78 |
|
| F7 | f_4cd8428f |
|
| F8 | f_6c4c98d0 |
|
| F9 | f_cb603504 |
|
| F10 | f_0a70c5ae |
|
| F11 | f_41ec81e5 |
|
| F12 | f_f6f63d8f |
|
| F13 | f_da18dd62 |
|
| F14 | f_0e918a03 |
|
| F15 | f_e3f72cf7 |
|
| F16 | f_21bee88e |
📝 PR 规范检查
符合规范。PR Category、PR Types、Description、是否引起精度变化均已正确填写。
总体评价
本轮仍发现新增兼容改动中的一个 BC break 和一个公开导出遗漏;同时历史 finding 里多项关键问题仍未修复。建议先恢复旧签名并同步导出列表,再继续处理既有未解决问题。
| axes: Sequence[int] = [0], | ||
| starts: Sequence[int] = [0], | ||
| ends: Sequence[int] | None = None, | ||
| strides: Sequence[int] = [1], |
There was a problem hiding this comment.
🔴 兼容性 slice_scatter 这次把原有的 name 参数从实现签名里删除了。
旧签名支持 paddle.slice_scatter(..., name=...),现在装饰器会把 name 原样传给这个函数并触发 TypeError: got an unexpected keyword argument 'name',这属于公开 API 的 BC break。
建议修复方式:保留 Paddle 旧签名的 name: str | None = None(包括 overload/实现签名),新增 PyTorch 风格参数时只做别名和默认值兼容,不删除既有 name 入口。
| add_n, | ||
| addmm, | ||
| addmm_, | ||
| addmv, |
There was a problem hiding this comment.
🟡 建议 这里新增了顶层 addmv/addr 等导入,但没有同步更新下方的 paddle.__all__。
tools/print_signatures.py 会读取模块的 __all__ 枚举公开 API,from paddle import * 也依赖它;当前会漏掉本 PR 新增的 addmv、addmv_、addr、addr_、histc 以及 fix/mvlgamma/negative_ 等别名。
建议修复方式:把本 PR 新增的顶层公开 API/别名同步加入 __all__,避免 API 兼容检查和通配导入遗漏。
…y AI Agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…Is Edit By AI Agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| list(REMOVE_ITEM TEST_OPS test_api_compatibility_part1) | ||
| list(REMOVE_ITEM TEST_OPS test_api_compatibility_part2) | ||
| list(REMOVE_ITEM TEST_OPS test_api_compatibility_part3) | ||
| list(REMOVE_ITEM TEST_OPS test_api_compatibility_part4) | ||
| list(REMOVE_ITEM TEST_OPS test_api_compatibility_part5) |
There was a problem hiding this comment.
这个 PR 只涉及 4、5,但是这里把 1、2、3 也移除了,是预期范围内的吗?
There was a problem hiding this comment.
1、2、3后面也可以往里加case,一起顺带移除了,API兼容性不涉及底层Kernel,就不测这个了。
PR Category
User Experience
PR Types
Improvements
Description
API Compatibility Edit By AI Agent:
torch.select_scattertorch.Tensor.select_scattertorch.sgntorch.Tensor.sgntorch.signbittorch.Tensor.signbittorch.slice_scattertorch.Tensor.slice_scattertorch.taketorch.Tensor.taketorch.tensordottorch.tril_indicestorch.triu_indicestorch.vandertorch.logaddexptorch.Tensor.logaddexptorch.logspacetorch.moveaxistorch.Tensor.moveaxistorch.nan_to_numtorch.Tensor.nan_to_numtorch.nanmeantorch.Tensor.nanmeantorch.nansumtorch.Tensor.nansumtorch.masked_filltorch.Tensor.addmv_torch.Tensor.addr_torch.Tensor.col_indicestorch.Tensor.crow_indicestorch.Tensor.erf_torch.Tensor.expm1_torch.Tensor.fix_torch.Tensor.matrix_exptorch.Tensor.mvlgamma_torch.Tensor.negative_torch.Tensor.retain_gradtorch.Tensor.sparse_masktorch.Tensor.square_torch.Tensor.to_sparsetorch.addmvtorch.addrtorch.autograd.enable_gradtorch.fixtorch.histctorch.special.roundtorch.trunc相关PR:PaddlePaddle/PaConvert#887 、 PaddlePaddle/docs#7909
是否引起精度变化
否