-
Notifications
You must be signed in to change notification settings - Fork 861
[CI][Fix Doc] Enhance Script Robustness and Implement Full-Process Automation for Code Generation Toolchain #7478
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
[CI][Fix Doc] Enhance Script Robustness and Implement Full-Process Automation for Code Generation Toolchain #7478
Conversation
| 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) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytorch_api_mapping会每天自动刷新吗。
应该删除这些词条,不要显式写出来。
ci_scripts/hooks/pre-doc-compile.sh
Outdated
ATTRIBUTE_MAPPING_URL="https://raw.githubusercontent.com/PaddlePaddle/PaConvert/master/paconvert/attribute_mapping.json" | ||
|
||
# 下载文件 | ||
echo "Downloading API mapping files to ${TOOLS_DIR}..." |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ,无需新增)
那样,能自动生成的就不要手动维护,减少出错概率。
先合入了。 功能缺失词条的优化,下个PR再开展吧。 |
@@ -1,4 +1,5 @@ | |||
import argparse | |||
import ast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件增加一个输入,类似于一致性校验工具一样,指定api_difference_info.json的路径。
No description provided.