Skip to content

Conversation

@zhwesky2010
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 12, 2026 10:18
@paddle-bot
Copy link

paddle-bot bot commented Feb 12, 2026

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7742.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 试图在“PyTorch 转 Paddle”文档转换工具链中,临时禁用 get_url() 的 URL 解析能力,以规避不同环境下拉取/解析 Sphinx inventory(objects.inv)带来的不稳定性。

Changes:

  • get_url() 函数开头直接 return "",使 URL 解析逻辑不再执行。
  • 新增一条临时注释说明禁用原因(但存在拼写问题)。

Comment on lines 18 to 22
return ""
# TDDO(zhwesky2010): Test get_url stability in different environment, will cause instability now
try:
api_name = api_name.replace(r"\_", "_")
if package is None:
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_url() 入口处无条件 return "" 会导致后续解析逻辑完全不可达,进而让 generate_pytorch_api_mapping.py 生成的 API 超链接全部缺失,并使 validate_api_difference_format.py 中的 URL 校验被整体跳过。若目的是规避网络/环境不稳定,建议改为通过环境变量/显式参数开关来禁用,或在 inventory 拉取失败时降级为本地缓存/Empty parser 并记录告警,而不是始终返回空字符串。

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sunzhongkai588 sunzhongkai588 merged commit aca0937 into PaddlePaddle:develop Feb 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants