[API Compatibility] Skill documentation updates Edit By AI Agent#7900
Closed
zhwesky2010 wants to merge 0 commit intoPaddlePaddle:developfrom
Closed
[API Compatibility] Skill documentation updates Edit By AI Agent#7900zhwesky2010 wants to merge 0 commit intoPaddlePaddle:developfrom
zhwesky2010 wants to merge 0 commit intoPaddlePaddle:developfrom
Conversation
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7900.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
Contributor
There was a problem hiding this comment.
Pull request overview
本 PR 为《Paddle API 对齐 PyTorch 项目》的工作流补充了一套 .claude/skills 文档与一个 “skill-recommender” 辅助脚本集合,用于从远端平台拉取/预览/安装技能,并完善各阶段 skill 的操作说明。
Changes:
- 新增 API 兼容性项目的分阶段 skills 文档(Step1~Step5)与总入口说明。
- 新增
skill-recommender:获取技能列表、获取下载链接、预览与安装脚本。 - 额外提交了一个
zip.zip归档文件(当前内容包含本地/产物文件)。
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/README.md | 汇总 skills 体系与调用方式说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-compatibility/SKILL.md | 总控 skill 流程与术语/目录说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-change-decider/SKILL.md | Step1:差异分析与方案决策说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/python-decorator/SKILL.md | Step2:Python 装饰器方案说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/cpp-sink/SKILL.md | Step2:C++ 下沉方案说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/pytorch-alignment-validator/SKILL.md | Step3:PaConvert 对齐验证说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-docs-updater/SKILL.md | Step4:中文 API 文档更新说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/create-pr/SKILL.md | Step5:多仓库提交与建 PR 流程说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/SKILL.md | skill-recommender 的使用步骤与交互说明 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/scripts/fetch_skills.py | 拉取远端技能元数据脚本 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/scripts/get_download_url.py | 获取技能包下载链接脚本 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/scripts/preview_skill.py | 安装前预览技能包信息脚本 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/scripts/install_skill.py | 下载并安装技能包脚本 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/scripts/test_detect.py | skills 目录探测调试脚本 |
| docs/dev_guides/coding_agent/api_compatibility/.claude/skills/skill-recommender/zip.zip | 归档产物(当前包含 .DS_Store / pycache / pyc 等) |
| --- | ||
| name: cpp-sink | ||
| description: 负责《Paddle API 对齐 PyTorch 项目》中 Step2:API 代码修改,实施 C++下沉的代码开发。通过将 Python API 下沉至 C++层,可以减少 Python 装饰器带来的性能开销,提升 API 调度效率。 | ||
| allowed-tools: Read Grep Glob Edit Bash |
| --- | ||
| name: python-decorator | ||
| description: 负责《Paddle API 对齐 PyTorch 项目》中 Step2:API 代码修改,实施 Python 装饰器的代码开发。通过 Python 装饰器,在 Python 层为 Paddle API 提供参数别名、参数顺序、参数类型和参数用法的兼容转换,实现 PyTorch 风格的 API 调用,并保持 Paddle API 的向后兼容性。 | ||
| allowed-tools: Read Grep Glob Edit Bash |
| --- | ||
| name: pytorch-alignment-validator | ||
| description: 负责《Paddle API 对齐 PyTorch 项目》中 Step3:Pytorch 对齐验证,基于 PaConvert 工具验证 Paddle API 与 PyTorch API 是否用法完全对齐一致 | ||
| allowed-tools: Read Grep Glob Write Edit Bash(python *) |
Comment on lines
+111
to
+112
| | API 中文文档 | 中文描述了该 API 的功能与行为 | 位于 docs/docs/api/paddle/目录,命名类似 tan_cn.rst | | ||
| | API 差异文档 | 中文描述了 Pytorch API 与 Paddle API 两者的行为差异 | 位于 docs/docs/guides/model_convert/convert_from_pytorch/api_difference/下的一级子目录,命名类似 torch.tan.md | |
| |-|-|-|-|-| | ||
| |API 中文文档|`{api_name}_cn.rst`|docs/docs/api/paddle/|tan_cn.rst|| | ||
| |API 差异文档|`torch.{api_name}.md`|docs/docs/guides/model_convert/convert_from_pytorch/api_difference/|torch.tan.md|| | ||
| |C++下沉使用|`python_api_info.yaml`、`ops.yaml`|Paddle/paddle/phi/ops/yaml/|python_api_info.yamlops.yaml|| |
Comment on lines
+96
to
+101
| # 解压zip文件 | ||
| with zipfile.ZipFile(zip_path, "r") as zip_ref: | ||
| zip_ref.extractall(temp_extract_dir) | ||
|
|
||
| # 查找SKILL.md文件 | ||
| skill_md_path = Path(temp_extract_dir) / skill_name / "SKILL.md" |
Comment on lines
+61
to
+62
| |API 中文文档|`{api_name}_cn.rst`|docs/docs/api/paddle/|tan_cn.rst|| | ||
| |API 差异文档|`torch.{api_name}.md`|docs/docs/guides/model_convert/convert_from_pytorch/api_difference/|torch.tan.md|| |
| ## Step 1: 分析差异文档 | ||
|
|
||
| ### 1.1 获取差异文档 | ||
| 务必查阅每个 PyTorch API 对应的 API 差异文档(`torch.{api_name}.md`,位于 docs/docs/guides/model_convert/convert_from_pytorch/api_difference/目录下),如果实在无法找到差异文档,则说明该 API 已经实现了对齐一致,差异分类直接视作『API 完全一致』,无需再查询其他内容。 |
| --- | ||
| name: api-change-decider | ||
| description: 负责《Paddle API 对齐 PyTorch 项目》中 Step1:方案决策,分析 PyTorch API 与 Paddle API 之间的差异,制定合适的 API 改动方案 | ||
| allowed-tools: Read Grep Glob WebSearch |
| --- | ||
| name: api-docs-updater | ||
| description: 负责《Paddle API 对齐 PyTorch 项目》中 Step4:API 文档修改,在 API 代码修改完成后,同步更新中文 API 文档,确保文档准确反映 API 的最新行为 | ||
| allowed-tools: Read Grep Glob Write Edit |
📚 本次 PR 文档预览链接(点击展开)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API Compatibility Edit By AI Agent:
Skill documentation and configuration updates for the Paddle API Compatibility project workflow.