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

【映射文档】补全缺失的映射文档 #6519

Merged
merged 5 commits into from
Mar 13, 2024

Conversation

RedContritio
Copy link
Contributor

  • 修复 4 个此前存在问题的映射文档
  • 添加 16 个映射文档

当前存量的缺失映射文档仍有 33 条,列表如下:

# fairscale 7 条
fairscale.nn.model_parallel.initialize.get_model_parallel_rank
fairscale.nn.model_parallel.initialize.get_model_parallel_world_size
fairscale.nn.model_parallel.initialize.initialize_model_parallel
fairscale.nn.model_parallel.initialize.model_parallel_is_initialized
fairscale.nn.model_parallel.layers.ColumnParallelLinear
fairscale.nn.model_parallel.layers.ParallelEmbedding
fairscale.nn.model_parallel.layers.RowParallelLinear
# os 1 条
os.environ.get
# setuptools 1 条
setuptools.setup
# torch 24 条
torch.Generator
torch.Size
torch.Tensor
torch.Tensor.allclose
torch.Tensor.erfc
torch.Tensor.index_copy_
torch.Tensor.max
torch.Tensor.min
torch.Tensor.new_empty
torch.Tensor.new_full
torch.Tensor.new_ones
torch.Tensor.new_tensor
torch.Tensor.new_zeros
torch.Tensor.rename
torch.cuda.BoolTensor
torch.cuda.ByteTensor
torch.cuda.FloatTensor
torch.cuda.IntTensor
torch.cuda.LongTensor
torch.device
torch.distributed.rpc.init_rpc
torch.inference_mode
torch.nn.modules.utils._ntuple
torch.nn.modules.utils._pair

Copy link

paddle-bot bot commented Mar 11, 2024

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6519.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

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.

fairscale那些不用写,是一个torch的分布式加速库,是另一名同学开发的Matcher,后续让他统一补充

os、setuptools这些特殊的不用写

你这边只需要补充剩余的 torch.*

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | -- |
| input | x | 输入 Tensor,仅参数名不一致。 |
| p | p | 范数(ord)的种类。PyTorch 支持 "nuc", "fro" 与任意数值(包括 inf 和 -inf),Paddle 暂不支持 "nuc"。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个Paddle是支持的,注意查一下API升级里面的:linaglg.norm改动

PaddlePaddle/Paddle#60070

Copy link
Collaborator

Choose a reason for hiding this comment

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

PaddlePaddle/Paddle#62240

注意:torch.norm与torch.linalg.norm的行为不一致,当前是与后者进行了对齐


### [torch.utils.data.RandomSampler](https://pytorch.org/docs/stable/data.html#torch.utils.data.RandomSampler)

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

```python

Copy link
Contributor Author

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.

已添加于 #6541

@@ -1,4 +1,4 @@
## [ 参数不一致 ]torch.norm
## [ torch 参数更多 ]torch.norm
Copy link
Collaborator

@zhwesky2010 zhwesky2010 Mar 13, 2024

Choose a reason for hiding this comment

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

  1. torch.norm这个API可能存在一些更深层次的 API功能不一致 的问题,下个PR改一下吧,可能不仅仅是文档,Matcher、单测 同时存在问题

  2. torch.trunc_divide 还没有实现,使用组合实现:paddle.divide + paddle.trunctorch.floor_divide直接对应paddle.floor_divide,后面确认一下

@zhwesky2010 zhwesky2010 merged commit 02dfe80 into PaddlePaddle:develop Mar 13, 2024
2 checks passed
@RedContritio RedContritio deleted the fix_missing_1 branch March 19, 2024 02:35
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.

2 participants