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

单测case覆盖2 #455

Merged
merged 4 commits into from
Aug 23, 2024
Merged

单测case覆盖2 #455

merged 4 commits into from
Aug 23, 2024

Conversation

Xuxuanang
Copy link
Contributor

PR Docs

单测case覆盖

PR APIs

torch.autograd.grad
torch.bernoulli
torch.chain_matmul
torch.cumulative_trapezoid
torch.distributions.Bernoulli
torch.distributions.Categorical
torch.distributions.Geometric 
torch.distributions.Multinomial
torch.dsplit
torch.hsplit
torch.linalg.matrix_rank 
torch.linalg.solve_triangular
torch.load
torch.max
torch.max_pool1d
torch.nn.init.xavier_uniform_ 
torch.nn.utils.vector_to_parameters 
torch.nonzero

Copy link

paddle-bot bot commented Aug 19, 2024

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 19, 2024
@@ -4755,17 +4755,13 @@
"paddle_api": "paddle.bernoulli",
"args_list": [
"input",
"p",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个删得不对吧,文档是有bug的,以实际代码为准

infoflow 2024-08-21 15-37-58

@@ -1003,6 +1003,7 @@ def get_paddle_nodes(self, args, kwargs):
else:
code = "{}({})".format(paddle_api, self.kwargs_to_str(new_kwargs))

self.api_mapping["args_list"] = ["input", "dim", "keepdim", "*", "out"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个已经组装代码完成了,改这个应该没什么意义吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个如果不改的话会影响到后面的testcase。

result = torch.bernoulli(a, p=0.0)
a = torch.ones(3, 3)
out = torch.zeros(3, 3)
result = torch.bernoulli(a, out=out, generator=torch.Generator())
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个p是支持的,改的时候注意在本地运行代码测试,以实际运行为准,因为torch API文档也可能有bug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经修改

tests/test_distributions_Bernoulli.py Show resolved Hide resolved
tests/test_distributions_Categorical.py Show resolved Hide resolved
tests/test_distributions_Geometric.py Show resolved Hide resolved
tests/test_distributions_Multinomial.py Show resolved Hide resolved
@zhwesky2010 zhwesky2010 merged commit 30d04ee into PaddlePaddle:master Aug 23, 2024
9 checks passed
@luotao1
Copy link
Collaborator

luotao1 commented Aug 26, 2024

hi, @Xuxuanang

  • 非常感谢你对飞桨的贡献,我们正在运营一个PFCC组织,会通过定期分享技术知识与发布开发者主导任务的形式持续为飞桨做贡献,详情可见 https://github.com/luotao1 主页说明。
  • 如果你对PFCC有兴趣,请发送邮件至 ext_paddle_oss@baidu.com,我们会邀请你加入~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants