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

[Typing][C-80, C-86] Add type annotations for python/paddle/incubate/{nn/functional/variable_length_memory_efficient_attention, operators/graph_khop_sampler}.py #67197

Merged
merged 20 commits into from
Aug 15, 2024

Conversation

inaomIIsfarell
Copy link
Contributor

@inaomIIsfarell inaomIIsfarell commented Aug 8, 2024

PR Category

User Experience

PR Types

Improvements

Description

类型标注:

  • python/paddle/incubate/nn/functional/variable_length_memory_efficient_attention.py (C-80)
  • python/paddle/incubate/operators/graph_khop_sampler.py (C-86)

Related links

@SigureMo @megemini

Copy link

paddle-bot bot commented Aug 8, 2024

你的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.

Copy link
Contributor

@megemini megemini left a comment

Choose a reason for hiding this comment

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

@SigureMo paddle.incubate.graph_khop_sampler 示例跑不通 ... ...

colptr: Tensor,
input_nodes: Tensor,
sample_sizes: list[int] | tuple[int, ...],
sorted_eids: Tensor | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sorted_eids: Tensor | None = None,
sorted_eids: Tensor | None = ...,

colptr: Tensor,
input_nodes: Tensor,
sample_sizes: list[int] | tuple[int, ...],
sorted_eids: Tensor | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sorted_eids: Tensor | None = None,
sorted_eids: Tensor | None = ...,

colptr: Tensor,
input_nodes: Tensor,
sample_sizes: list[int] | tuple[int, ...],
sorted_eids: Tensor | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sorted_eids: Tensor | None = None,
sorted_eids: Tensor | None = ...,

@megemini
Copy link
Contributor

@inaomIIsfarell 示例跑不通,skip 吧,理由写 Number of sample edges dismatch, the sample kernel has error.

@inaomIIsfarell inaomIIsfarell changed the title [Typing][C-80, C-86] Add annotations for python/paddle/inbucate/{nn/functional/variable_length_memory_efficient_attention, operators/graph_khop_sampler}.py [Typing][C-80, C-86] skip type hint Aug 13, 2024
@megemini
Copy link
Contributor

@inaomIIsfarell 不是关了 PR ,是 skip 测试用例 ... ...

参考 https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/style_guide_and_references/code_example_writing_specification_cn.html#changshiqujianchayouyutiaoguo

@inaomIIsfarell inaomIIsfarell changed the title [Typing][C-80, C-86] skip type hint [Typing][C-80, C-86] Add type annotations for python/paddle/incubate/{nn/functional/variable_length_memory_efficient_attention, operators/graph_khop_sampler}.py Aug 13, 2024

Examples:
.. code-block:: python

>>> # doctest: +REQUIRES(env:GPU)
>>> # doctest: +SKIP('Number of sample edges dismatch, the sample kernel has error.')
Copy link
Contributor

Choose a reason for hiding this comment

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

这个用例不需要

Copy link
Contributor

@megemini megemini left a comment

Choose a reason for hiding this comment

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

LGTM ~

@inaomIIsfarell 一般来说,不需要修改原代码里面的内容,variable_length_memory_efficient_attention.py 示例里面原来有 >>> # doctest: +REQUIRES(env:GPU) ,这里给删掉了 ... ... 不过,CI 过了,应该不影响,后面注意一下哈 ~ 🤟

@inaomIIsfarell
Copy link
Contributor Author

LGTM ~

@inaomIIsfarell 一般来说,不需要修改原代码里面的内容,variable_length_memory_efficient_attention.py 示例里面原来有 >>> # doctest: +REQUIRES(env:GPU) ,这里给删掉了 ... ... 不过,CI 过了,应该不影响,后面注意一下哈 ~ 🤟

sry......删多了

@luotao1 luotao1 merged commit 280fcd2 into PaddlePaddle:develop Aug 15, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants