Skip to content

Conversation

@DanielSun11
Copy link
Contributor

@DanielSun11 DanielSun11 commented Aug 18, 2025

PR Category

Operator Mechanism

PR Types

Improvements

Description

#74676 的完善。
采用 #74676 (comment) @SigureMo 建议的方法,提升C++下沉方案中解析signature 过程的鲁棒性。

pcard-67164

@DanielSun11 DanielSun11 changed the title Use a more robust signature parsing method for sinking to C [API Compatible ]Use a more robust signature parsing method for Python API sinking to C++ Aug 18, 2025
SigureMo
SigureMo previously approved these changes Aug 18, 2025
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

@SigureMo SigureMo changed the title [API Compatible ]Use a more robust signature parsing method for Python API sinking to C++ [API Compatible] Use a more robust signature parsing method for Python API sinking to C++ Aug 18, 2025
@paddle-bot
Copy link

paddle-bot bot commented Aug 18, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@SigureMo
Copy link
Member

SigureMo commented Aug 18, 2025

**************************************************************
API Difference is: 
- paddle._paddle_docs.add_doc_and_signature (ArgSpec(args=['method', 'docstr', 'signature'], varargs=None, varkw=None, defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={'return': None, 'method': <class 'str'>, 'docstr': <class 'str'>, 'signature': <class 'str'>}), ('document', '10436ac8f85701d92d9e96d33530a256'))
?                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                 ----                                            ^^^^^^^^^

+ paddle._paddle_docs.add_doc_and_signature (ArgSpec(args=['func_name', 'docstr', 'func_def'], varargs=None, varkw=None, defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={'return': None, 'func_name': <class 'str'>, 'docstr': <class 'str'>, 'func_def': <class 'str'>}), ('document', '10436ac8f85701d92d9e96d33530a256'))
?                                                           +++++++  ^^^^^^^^^^^^^^^^^^^^^^                                                                                                               +++++++  

这个 API 是不是误暴露为公开 API 了,会呈现在官网文档的,这个看起来是内部 API,应该可以从 __all__ 里删掉1

Footnotes

  1. __all__ 里的 API 会作为公开 API 呈现,比如 paddle.a.b.c.__all__ = ["d", "e"] 会将 paddle.a.b.c.dpaddle.a.b.c.e 作为公开 API,这是 Paddle 的规范,不是 Python 的规范

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@14373b3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
python/paddle/_paddle_docs.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #74700   +/-   ##
==========================================
  Coverage           ?   93.33%           
==========================================
  Files              ?        1           
  Lines              ?       15           
  Branches           ?        0           
==========================================
  Hits               ?       14           
  Misses             ?        1           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SigureMo SigureMo merged commit c363e6a into PaddlePaddle:develop Aug 19, 2025
87 of 91 checks passed
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
@DanielSun11 DanielSun11 deleted the sig_parse branch September 18, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants