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

【Hackathon2 No.56 57 58 59 Hackathon3 No.23】add doc of paddle.incubate.sparse.add subtract multiply divide is_same_shape #4705

Merged
merged 13 commits into from
Sep 9, 2022

Conversation

gsq7474741
Copy link
Contributor

@gsq7474741 gsq7474741 commented Apr 28, 2022

【Hackathon No.56 57 58 59】add docs for PaddlePaddle/Paddle#41857
【Hackathon No.23】add docs for PaddlePaddle/Paddle#45086

PADDLEPADDLE_PR=45086

@paddle-bot-old
Copy link

Thanks for your contribution!

docs/api/paddle/sparse/sparse_multiply_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/sparse/sparse_divide_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/sparse/sparse_subtract_cn.rst Outdated Show resolved Hide resolved
@gsq7474741 gsq7474741 requested a review from TCChenlong May 5, 2022 06:26
@gsq7474741 gsq7474741 changed the title 【Hackathon No.56 57 58 59】add doc of paddle.sparse.add subtract multiply divide 【Hackathon2 No.56 57 58 59 Hackathon3 No.23】add doc of paddle.incubate.sparse.add subtract multiply divide is_same_shape Sep 4, 2022
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.

COPY-FROM: paddle.incubate.sparse.* 这里的示例代码都能成功对吧

docs/api/paddle/incubate/sparse/sparse_add_cn.rst Outdated Show resolved Hide resolved
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

这些 API 文件名貌似不需要加 sparse_ 前缀

image

以及有一些代码风格检查没有过,需要在 docs 这个项目下同样注册 pre-commit 的 hooks

pip install pre-commit==2.17.0  # 这个估计在 Paddle 那边已经安装过了
pre-commit install              # docs 目前为 API docs 引入了一些 hooks,因此这面也需要注册下

# 或者手动为这些文件运行 hook 脚本
pre-commit run --files <filepath>

docs/api/paddle/incubate/sparse/sparse_add_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/incubate/sparse/sparse_add_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/incubate/sparse/sparse_add_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/incubate/sparse/sparse_add_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/incubate/sparse/Overview_cn.rst Outdated Show resolved Hide resolved
@gsq7474741 gsq7474741 requested review from zhwesky2010 and SigureMo and removed request for TCChenlong and zhwesky2010 September 6, 2022 18:11
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

其他应该没啥问题了~

docs/api/paddle/incubate/sparse/add_cn.rst Show resolved Hide resolved

.. py:function:: paddle.incubate.sparse.is_same_shape(x, y)

返回两个 Tensor 形状比较的结果,判断输入 :attr:`x` 与输入 :attr:`y` 的形状是否相同,支持 DenseTensor、SparseCsrTensor 与 SparseCooTensor 之间任意两种的形状比较。
Copy link
Member

Choose a reason for hiding this comment

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

这里最好和英文是一致的,现在英文貌似少一些内容~

Copy link
Collaborator

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

good job!LGTM

@zhwesky2010 zhwesky2010 merged commit 750d619 into PaddlePaddle:develop Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants