Skip to content

Conversation

hd9568
Copy link
Contributor

@hd9568 hd9568 commented Sep 26, 2025

No description provided.

| 92 | [torchvision.transforms.functional.pad](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.pad.html) | [paddle.vision.transforms.pad](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/transforms/pad_cn.html) | - |
| 93 | [torchvision.transforms.functional.to_grayscale](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.to_grayscale.html?highlight=to_grayscale#torchvision.transforms.functional.to_grayscale) | [paddle.vision.transforms.to_grayscale](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/to_grayscale_cn.html#to-grayscale) | [差异对比](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.to_grayscale.html) |
| 94 | [torchvision.transforms.functional.vflip](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.vflip.html) | [paddle.vision.transforms.vflip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/vflip_cn.html) | [差异对比](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.vflip.html) |
| 1 | [fairscale.nn.model\_parallel.initialize.get\_model\_parallel\_world\_size](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/initialize.py#L150) | [paddle.distributed.fleet.base.topology.\_HYBRID\_PARALLEL\_GROUP.\_mp\_degree](https://github.com/PaddlePaddle/Paddle/blob/ddac1b431483ddc0f1ee600e799aa31fc0a75961/python/paddle/distributed/fleet/base/topology.py#L185) | [差异对比](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_world_size.html) |
Copy link
Collaborator

@zhwesky2010 zhwesky2010 Sep 26, 2025

Choose a reason for hiding this comment

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

pytorch_api_mapping会每天自动刷新吗。

应该删除这些词条,不要显式写出来。

ATTRIBUTE_MAPPING_URL="https://raw.githubusercontent.com/PaddlePaddle/PaConvert/master/paconvert/attribute_mapping.json"

# 下载文件
echo "Downloading API mapping files to ${TOOLS_DIR}..."
Copy link
Collaborator

Choose a reason for hiding this comment

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

参考:

#  echo "downloading ${f} ..."
#    if [ "${https_proxy}" != "" ] ; then
#        curl -o ${TMP_FILE} -s -x ${https_proxy} ${f}
#    else
#        curl -o ${TMP_FILE} -s ${f}
#    fi

多打点日志,如果有代理,用代理来下载。注意关闭回显:set +x


def generate_no_implement_table(
docs_mapping, no_implement_path, base_dir, existing_apis
docs_mapping, md_content, base_dir, existing_apis
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里最好把公共内容去除掉(例如链接这些),只传入 API名、备注,其他的内容都靠自动生成。

像之前那样的宏:NOT_IMPLEMENT(torch.Tensor.rename, 实验阶段不稳定 API ,无需新增) 那样,能自动生成的就不要手动维护,减少出错概率。

@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Sep 26, 2025

先合入了。

功能缺失词条的优化,下个PR再开展吧。

@@ -1,4 +1,5 @@
import argparse
import ast
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个文件增加一个输入,类似于一致性校验工具一样,指定api_difference_info.json的路径。

@zhwesky2010 zhwesky2010 merged commit af84ac3 into PaddlePaddle:develop Sep 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants