Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] fix ci script && check stock issues #7069

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ooooo-create
Copy link
Collaborator

@ooooo-create ooooo-create commented Mar 2, 2025

Description

TODO

  • may be should check cn_api args with en_api args
  • 非公开 api 要不要在 docs 删一下,和英文对齐吗(假设英文是对的),中文有没有比英文缺的 api
  • .. py:function:: 句尾不能有冒号
  • rst 里的格式丰富多彩🙀;规范记录和检查脚本怎么同步;
    cat

  1. api 字符串书写格式未匹配或缺失
    docs/api/paddle/incubate/nn/functional/fused_feedforward_cn.rst
    docs/api/paddle/jit/not_to_static_cn.rst
    docs/api/paddle/jit/to_static_cn.rst
    docs/api/paddle/linalg/matrix_norm_cn.rst
    docs/api/paddle/linalg/norm_cn.rst
    docs/api/paddle/linalg/vector_norm_cn.rst
    docs/api/paddle/nn/functional/hardtanh_cn.rst
    docs/api/paddle/sparse/slice_cn.rst
    docs/api/paddle/sparse/sum_cn.rst
  2. api 未公开或没有找到
    paddle.NPUPlace
    paddle.device.is_compiled_with_mlu
    paddle.device.is_compiled_with_npu
    paddle.device.MLUPlace
    paddle.distributed.utils.global_gather
    paddle.distributed.utils.global_scatter
    paddle.incubate.nn.FusedEcMoe
    paddle.incubate.nn.functional.fused_ec_moe
    paddle.nn.functional.flash_attention_with_sparse_mask
    paddle.static.mlu_places
    paddle.static.npu_places
    paddle.static.nn.multi_box_head
    paddle.static.nn.sequence_concat
    paddle.static.nn.sequence_enumerate
    paddle.static.nn.sequence_expand_as
    paddle.static.nn.sequence_pad
    paddle.static.nn.sequence_reshape
    paddle.static.nn.sequence_reverse
    paddle.static.nn.sequence_scatter
    paddle.static.nn.sequence_slice
  3. 参数脚本检查出来的错误
  4. fullargspec 的检查:目前只检查 args 位置参数,其他类型没有适配,在删除完 api 之后,api_info_json是否会全部包含呢,这个检查是否还会用到

@SigureMo @sunzhongkai588

@ooooo-create ooooo-create requested a review from Copilot March 3, 2025 02:13
Copy link

@Copilot 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.

PR Overview

This PR addresses issues with the CI script by ensuring that the check for API parameters works correctly and exposing stock API issues. Key changes include:

  • Adding an import for paddle to avoid module resolution issues.
  • Adding a TODO comment to handle the to_static and not_to_static function special cases.

Reviewed Changes

File Description
ci_scripts/check_api_parameters.py Added paddle import to ensure module availability and updated a TODO comment regarding special cases

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comment on lines +263 to 266
# TODO: deal with to_static and not_to_static, because func and decorator.
info = 'funcname in title is not found, please check the format of ".. py:function::func()"'
api_notfound[rstfile] = info
print(f"check failed (object not found): {rstfile}")
Copy link
Preview

Copilot AI Mar 3, 2025

Choose a reason for hiding this comment

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

[nitpick] The TODO comment indicates that special handling for to_static and not_to_static is still missing. Please add the necessary logic and accompanying test coverage to ensure these cases are properly handled.

Suggested change
# TODO: deal with to_static and not_to_static, because func and decorator.
info = 'funcname in title is not found, please check the format of ".. py:function::func()"'
api_notfound[rstfile] = info
print(f"check failed (object not found): {rstfile}")
if funcname in ("to_static", "not_to_static"):
print(f"check func:{funcname} in {rstfilename} with its FullArgSpec")
flag = _check_params_in_description_with_fullargspec(rstfilename, funcname)
if flag:
check_passed.append(rstfile)
print(f"check success: {rstfile}")
else:
check_failed[rstfile] = info
print(f"check failed: {rstfile}")
else:
info = 'funcname in title is not found, please check the format of ".. py:function::func()"'
api_notfound[rstfile] = info
print(f"check failed (object not found): {rstfile}")

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link

paddle-bot bot commented Mar 3, 2025

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

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.

1 participant