Skip to content

Conversation

hd9568
Copy link
Contributor

@hd9568 hd9568 commented Sep 28, 2025

No description provided.

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

transformers.PreTrainedTokenizer 改成 仅API调用方式不一致

@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Sep 28, 2025

仅API调用方式不一致,基本都不符合模板要求,模板格式如下:

分类 2:仅 API 调用方式不一致

[ 仅 API 调用方式不一致 ]torch.Tensor.det

torch.Tensor.det

torch.Tensor.det()

paddle.linalg.det

paddle.linalg.det(x, name=None)

两者功能一致,但调用方式不一致,具体如下:

转写示例

# PyTorch 写法:
x.det()

# Paddle 写法:
paddle.linalg.det(x)

@zhwesky2010 zhwesky2010 changed the title [CI] 调试CI执行结果 更新映射文档 Sep 28, 2025
Copy link

paddle-bot bot commented Sep 28, 2025

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

@@ -1,4 +1,4 @@
## [ 无参数 ] torch.Tensor.dtype
## [仅 API 调用方式不一致] torch.Tensor.dtype
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个在NO_NEED_CONVERT里,第1类。怎么扫成了 第2类

@@ -1,4 +1,4 @@
## [ 无参数 ] torch.Tensor.T
## [仅 API 调用方式不一致] torch.Tensor.T
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个也在NO_NEED_CONVERT里,第1类。怎么扫成了 第2类

@zhwesky2010
Copy link
Collaborator

检查一下,第2类里是不是有些映射文档不太正确。

api_difference里的内容可以暂时不校正,但个数和文件名是要能对上的。

@@ -1,4 +1,4 @@
## [ 无参数 ]torch.numel
## [仅 API 调用方式不一致]torch.numel
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个不是那5种Matcher,是NumelMatcher,为何归到invok_diff_only里了

这个其实是 返回类型不一致

@@ -1,4 +1,4 @@
## [参数完全一致]transformers.modeling_outputs.CausalLMOutputWithPast
## [仅 API 调用方式不一致]transformers.modeling_outputs.CausalLMOutputWithPast
Copy link
Collaborator

Choose a reason for hiding this comment

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

第三方库的,如果不属于3~12类,都先改成 『仅 API 调用方式不一致』

看看目前是不是这样的

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

代码风格没通过

@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Sep 29, 2025

code style需要在本地装一个pre-commit,你本地提交时会自动触发 代码风格检查。

@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Sep 29, 2025

@hd9568 NO_NEED_CONVER的名单里又增加了一些,需要拉一下最新paconvert代码,重新刷一下。

@hd9568 hd9568 force-pushed the fix-automatic-render branch from 68dce0b to ae68885 Compare September 30, 2025 05:53
@@ -1,4 +1,4 @@
## [无参数]torch.get_default_device
## [仅 API 调用方式不一致]torch.get_default_device
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个在global_var里,是 『API完全一致』

@zhwesky2010
Copy link
Collaborator

infoflow 2025-09-30 15-46-35

@zhwesky2010
Copy link
Collaborator

NumelMatcher、Is_InferenceMatcher都算做 仅API调用方式不一致

@zhwesky2010 zhwesky2010 merged commit 1633f42 into PaddlePaddle:develop Sep 30, 2025
2 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