-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Typing][C-88,C-89] Add type annotations for python/paddle/incubate/operators/* #67104
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
return_eids: bool = False, | ||
flag_perm_buffer: bool = False, | ||
name: str | None = None, | ||
) -> tuple[Tensor, Tensor, Tensor]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据 return_eids
使用 overload
pool_type: str = "sum", | ||
out_size=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pool_type
使用 Literal
out_size
没标注 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改了,麻烦再看一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overload
使用有问题,参考 #66792
@Sekiro-x |
@deprecated( | ||
since="2.4.0", | ||
update_to="paddle.geometric.sample_neighbors", | ||
level=1, | ||
reason="paddle.incubate.graph_sample_neighbors will be removed in future", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到下面函数正式定义的地方吧, overload
的部分单独放在上面 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看一下 CI 检查的情况,基本没问题了 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只剩下PR-CI-Static-Check没有通过了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在示例的 graph_send_recv
调用处加上 type: ignore[operator]
,如
>>> out = paddle.incubate.graph_send_recv(x, src_index, dst_index, pool_type="sum") # type: ignore[operator]
看一下 CI 的报错信息,有多个地方需要加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Category
User ExperiencePR Types
ImprovementsDescription
类型标注:
graph_sample_neighbors.py
graph_send_recv.py
Related links
@SigureMo @megemini