-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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-60] Add type annotations for python/paddle/incubate/autograd/primapi.py
#66016
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
from paddle import Tensor | ||
from paddle.base.framework import Block | ||
|
||
_T_TensorOrTensors = TypeVar("_T_TensorOrTensors", Tensor, Sequence[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.
_T_TensorOrTensors = TypeVar("_T_TensorOrTensors", Tensor, Sequence[Tensor]) | |
_TensorOrTensorsT = TypeVar("_TensorOrTensorsT", Tensor, Sequence[Tensor]) |
backward_length=-1, | ||
): | ||
blocks: Block | Sequence[Block], | ||
blacklist: set | frozenset = frozenset(), |
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.
set 泛型参数漏了?frozenset 是不是也是泛型?
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.
示例代码好像有问题? |
是代码有问题 Paddle/python/paddle/incubate/autograd/primapi.py Lines 206 to 207 in dd6b467
都不用写测试用例的吗 ... ... 咋办?SKIP? |
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 Experience
PR Types
Improvements
Description
类型标注:
python/paddle/incubate/autograd/primapi.py
Related links
@SigureMo @megemini