Skip to content

Commit a0fb1ba

Browse files
authored
[CodeStyle] Add new pre-commit hook yamlfmt (#72216)
1 parent 366ca34 commit a0fb1ba

15 files changed

+1035
-1022
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ charset = utf-8
1212
trim_trailing_whitespace = true
1313
insert_final_newline = true
1414

15-
[*.{c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps}]
15+
[*.{c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps,yml,yaml}]
1616
indent_size = 2
1717

1818
[*.{py,pyi,java,r,toml}]

.github/ISSUE_TEMPLATE/1_bug-report.yml

+49-49
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,63 @@ description: 报告一个可复现的BUG帮助我们修复框架。 Report a bug
44
labels: [type/bug-report, status/new-issue]
55

66
body:
7-
- type: markdown
8-
attributes:
9-
value: >
10-
#### 在向Paddle报bug之前,请先查询[历史issue](https://github.com/PaddlePaddle/Paddle/issues)是否报过同样的bug。
7+
- type: markdown
8+
attributes:
9+
value: >
10+
#### 在向Paddle报bug之前,请先查询[历史issue](https://github.com/PaddlePaddle/Paddle/issues)是否报过同样的bug。
1111
12-
#### Before submitting a bug, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/PaddlePaddle/Paddle/issues).
12+
#### Before submitting a bug, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/PaddlePaddle/Paddle/issues).
1313
14-
- type: textarea
15-
id: code
16-
attributes:
17-
label: bug描述 Describe the Bug
18-
description: |
19-
请清晰简洁的描述这个bug,最好附上bug复现环境、bug复现步骤及最小代码集,以便我们可以通过运行代码来重现错误。代码片段需要尽可能简洁,请花些时间去掉不相关的代码以帮助我们有效地调试。我们希望通过复制代码并运行得到与你相同的结果,请避免任何外部数据或包含相关的导入等。例如:
20-
```python
21-
# 导入所有必要的库。 All necessary imports at the beginning.
22-
# paddlepaddle <= 2.1.2
23-
import paddle
14+
- type: textarea
15+
id: code
16+
attributes:
17+
label: bug描述 Describe the Bug
18+
description: |
19+
请清晰简洁的描述这个bug,最好附上bug复现环境、bug复现步骤及最小代码集,以便我们可以通过运行代码来重现错误。代码片段需要尽可能简洁,请花些时间去掉不相关的代码以帮助我们有效地调试。我们希望通过复制代码并运行得到与你相同的结果,请避免任何外部数据或包含相关的导入等。例如:
20+
```python
21+
# 导入所有必要的库。 All necessary imports at the beginning.
22+
# paddlepaddle <= 2.1.2
23+
import paddle
2424
25-
# 一个简洁的片段,能够定位到bug。 A succinct reproducing example trimmed down to the essential parts.
26-
a = paddle.rand(shape=[1,4])
27-
b = paddle.rand(shape=[1,4])
28-
a.stop_gradient = False
29-
b.stop_gradient = False
25+
# 一个简洁的片段,能够定位到bug。 A succinct reproducing example trimmed down to the essential parts.
26+
a = paddle.rand(shape=[1,4])
27+
b = paddle.rand(shape=[1,4])
28+
a.stop_gradient = False
29+
b.stop_gradient = False
3030
31-
c = paddle.zeros((4, 4))
32-
c[0, :] = a/b
31+
c = paddle.zeros((4, 4))
32+
c[0, :] = a/b
3333
34-
print('Is c requires grad: ', not c.stop_gradient) # 注意:这里出现了bug,期望requires_grad=True
35-
```
36-
如果代码太长,请将可执行代码放到[AIStudio](https://aistudio.baidu.com/aistudio/index)中并将项目设置为公开(或者放到github gist上),请在项目中描述清楚bug复现步骤,在issue中描述期望结果与实际结果。
37-
如果你报告的是一个报错信息,请将完整回溯的报错贴在这里,并使用 ` ```三引号块``` `展示错误信息。
34+
print('Is c requires grad: ', not c.stop_gradient) # 注意:这里出现了bug,期望requires_grad=True
35+
```
36+
如果代码太长,请将可执行代码放到[AIStudio](https://aistudio.baidu.com/aistudio/index)中并将项目设置为公开(或者放到github gist上),请在项目中描述清楚bug复现步骤,在issue中描述期望结果与实际结果。
37+
如果你报告的是一个报错信息,请将完整回溯的报错贴在这里,并使用 ` ```三引号块``` `展示错误信息。
3838
3939
40-
placeholder: |
41-
请清晰简洁的描述这个bug。A clear and concise description of what the bug is.
40+
placeholder: |
41+
请清晰简洁的描述这个bug。A clear and concise description of what the bug is.
4242
43-
```python
44-
# 最小可复现代码。 Sample code to reproduce the problem.
45-
```
43+
```python
44+
# 最小可复现代码。 Sample code to reproduce the problem.
45+
```
4646
47-
```shell
48-
带有完整回溯的报错信息。 The error message you got, with the full traceback.
49-
```
50-
validations:
51-
required: true
47+
```shell
48+
带有完整回溯的报错信息。 The error message you got, with the full traceback.
49+
```
50+
validations:
51+
required: true
5252

53-
- type: textarea
54-
id: others
55-
attributes:
56-
label: 其他补充信息 Additional Supplementary Information
57-
description: |
58-
如果你还有其他需要补充的内容,请写在这里。
59-
If you have anything else to add, please write it here.
60-
validations:
61-
required: false
53+
- type: textarea
54+
id: others
55+
attributes:
56+
label: 其他补充信息 Additional Supplementary Information
57+
description: |
58+
如果你还有其他需要补充的内容,请写在这里。
59+
If you have anything else to add, please write it here.
60+
validations:
61+
required: false
6262

63-
- type: markdown
64-
attributes:
65-
value: >
66-
感谢你的贡献 🎉!Thanks for your contribution 🎉!
63+
- type: markdown
64+
attributes:
65+
value: >
66+
感谢你的贡献 🎉!Thanks for your contribution 🎉!

.github/ISSUE_TEMPLATE/2_feature-request.yml

+28-28
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@ description: 提交一个你对Paddle的新需求。 Submit a request for a new
33
labels: [type/feature-request, status/new-issue]
44

55
body:
6-
- type: markdown
7-
attributes:
8-
value: >
9-
#### 你可以在这里提出你对Paddle框架的新需求,包括但不限于:功能或模型缺失、功能不全或无法使用、精度/性能不符合预期等。
6+
- type: markdown
7+
attributes:
8+
value: >
9+
#### 你可以在这里提出你对Paddle框架的新需求,包括但不限于:功能或模型缺失、功能不全或无法使用、精度/性能不符合预期等。
1010
11-
#### You could submit a request for a new Paddle feature here, including but not limited to: new features or models, incomplete or unusable features, accuracy/performance not as expected, etc.
11+
#### You could submit a request for a new Paddle feature here, including but not limited to: new features or models, incomplete or unusable features, accuracy/performance not as expected, etc.
1212
13-
- type: textarea
14-
id: description
15-
attributes:
16-
label: 需求描述 Feature Description
17-
description: |
18-
请尽可能包含任务目标、需求场景、功能描述等信息,全面的信息有利于我们准确评估你的需求。
19-
Please include as much information as possible, such as mission objectives, requirement scenarios, functional descriptions, etc. Comprehensive information will help us accurately assess your feature request.
20-
value: "任务目标(请描述你正在做的项目是什么,如模型、论文、项目是什么?); <br /> 需求场景(请描述你的项目中为什么需要用此功能); <br /> 功能描述(请简单描述或设计这个功能)"
21-
validations:
22-
required: true
13+
- type: textarea
14+
id: description
15+
attributes:
16+
label: 需求描述 Feature Description
17+
description: |
18+
请尽可能包含任务目标、需求场景、功能描述等信息,全面的信息有利于我们准确评估你的需求。
19+
Please include as much information as possible, such as mission objectives, requirement scenarios, functional descriptions, etc. Comprehensive information will help us accurately assess your feature request.
20+
value: "任务目标(请描述你正在做的项目是什么,如模型、论文、项目是什么?); <br /> 需求场景(请描述你的项目中为什么需要用此功能); <br /> 功能描述(请简单描述或设计这个功能)"
21+
validations:
22+
required: true
2323

24-
- type: textarea
25-
id: alternatives
26-
attributes:
27-
label: 替代实现 Alternatives
28-
description: |
29-
如果你考虑过的任何替代解决方案或功能,请简要描述下,我们会综合评估。
30-
A description of any alternative solutions or features you've considered, if any.
31-
validations:
32-
required: false
24+
- type: textarea
25+
id: alternatives
26+
attributes:
27+
label: 替代实现 Alternatives
28+
description: |
29+
如果你考虑过的任何替代解决方案或功能,请简要描述下,我们会综合评估。
30+
A description of any alternative solutions or features you've considered, if any.
31+
validations:
32+
required: false
3333

34-
- type: markdown
35-
attributes:
36-
value: >
37-
感谢你的贡献 🎉!Thanks for your contribution 🎉!
34+
- type: markdown
35+
attributes:
36+
value: >
37+
感谢你的贡献 🎉!Thanks for your contribution 🎉!

.github/ISSUE_TEMPLATE/3_build-installation-issue.yml

+56-58
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,66 @@ description: 报告一个安装问题。 Report an issue related to build or ins
33
labels: [type/build, status/new-issue]
44

55
body:
6-
- type: markdown
7-
attributes:
8-
value: >
9-
#### 安装请参考[官网文档](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html),若未能解决你的问题,你可以在这里提issue。
6+
- type: markdown
7+
attributes:
8+
value: >
9+
#### 安装请参考[官网文档](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html),若未能解决你的问题,你可以在这里提issue。
1010
11-
#### Before submitting a Build/Installation Issue, please make sure you have visited the [official website](https://www.paddlepaddle.org.cn/documentation/docs/en/install/index_en.html).
11+
#### Before submitting a Build/Installation Issue, please make sure you have visited the [official website](https://www.paddlepaddle.org.cn/documentation/docs/en/install/index_en.html).
1212
13-
- type: textarea
14-
id: error
15-
attributes:
16-
label: 问题描述 Issue Description
17-
description: |
18-
请详细描述你的问题,同步贴出报错信息、日志/代码关键片段、复现步骤,以便我们快速排查问题。
19-
Please describe your problem in detail, and synchronously post the error message, key log/code snippet, and reproduction steps, so that we can quickly troubleshoot the problem.
20-
validations:
21-
required: true
13+
- type: textarea
14+
id: error
15+
attributes:
16+
label: 问题描述 Issue Description
17+
description: |
18+
请详细描述你的问题,同步贴出报错信息、日志/代码关键片段、复现步骤,以便我们快速排查问题。
19+
Please describe your problem in detail, and synchronously post the error message, key log/code snippet, and reproduction steps, so that we can quickly troubleshoot the problem.
20+
validations:
21+
required: true
2222

23-
- type: textarea
24-
id: environment
25-
attributes:
26-
label: 版本&环境信息 Version & Environment Information
27-
description: |
28-
请参考以下命令运行脚本[summary_env.py](https://github.com/PaddlePaddle/Paddle/blob/develop/tools/summary_env.py)获取版本&环境信息,并将输出拷贝在这里。
29-
Please run the following and paste the output below.
30-
```shell
31-
wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/tools/summary_env.py
32-
python3 -m pip install distro
33-
python3 summary_env.py
34-
```
35-
若运行脚本出现问题,请在issue中说明,并提供以下信息:
36-
1. PaddlePaddle版本:请提供你的PaddlePaddle版本号(如2.0.0)或CommitID。
37-
2. CPU(可选):请提供CPU型号,MKL/OpenBlas/MKLDNN/等数学库的使用情况,是否支持AVX指令集。
38-
3. GPU:请提供GPU型号,CUDA(如cuda10.2)和CUDNN版本号(如cudnn7.6.5)。
39-
4. 系统环境:请说明系统类型、版本(如Mac OS 10.14)。
40-
5. Python版本(如python 3.8)。
41-
6. (可选)若安装过程遇到问题,请提供安装方式(pip/conda/docker/源码编译)和相应的安装命令。
42-
7. (可选)若使用paddle过程中,遇到了无法使用gpu相关问题,请在命令行中键入`nvidia-smi`和`nvcc -V`,提供这两个命令输出的截图。
43-
8. (可选)若使用特殊硬件,请单独注明。
23+
- type: textarea
24+
id: environment
25+
attributes:
26+
label: 版本&环境信息 Version & Environment Information
27+
description: |
28+
请参考以下命令运行脚本[summary_env.py](https://github.com/PaddlePaddle/Paddle/blob/develop/tools/summary_env.py)获取版本&环境信息,并将输出拷贝在这里。
29+
Please run the following and paste the output below.
30+
```shell
31+
wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/tools/summary_env.py
32+
python3 -m pip install distro
33+
python3 summary_env.py
34+
```
35+
若运行脚本出现问题,请在issue中说明,并提供以下信息:
36+
1. PaddlePaddle版本:请提供你的PaddlePaddle版本号(如2.0.0)或CommitID。
37+
2. CPU(可选):请提供CPU型号,MKL/OpenBlas/MKLDNN/等数学库的使用情况,是否支持AVX指令集。
38+
3. GPU:请提供GPU型号,CUDA(如cuda10.2)和CUDNN版本号(如cudnn7.6.5)。
39+
4. 系统环境:请说明系统类型、版本(如Mac OS 10.14)。
40+
5. Python版本(如python 3.8)。
41+
6. (可选)若安装过程遇到问题,请提供安装方式(pip/conda/docker/源码编译)和相应的安装命令。
42+
7. (可选)若使用paddle过程中,遇到了无法使用gpu相关问题,请在命令行中键入`nvidia-smi`和`nvcc -V`,提供这两个命令输出的截图。
43+
8. (可选)若使用特殊硬件,请单独注明。
4444
45+
placeholder: |
46+
****************************************
47+
Paddle version:
48+
Paddle With CUDA:
4549
46-
placeholder: |
47-
****************************************
48-
Paddle version:
49-
Paddle With CUDA:
50+
OS:
51+
GCC version:
52+
Clang version:
53+
CMake version:
54+
Libc version:
55+
Python version:
5056
51-
OS:
52-
GCC version:
53-
Clang version:
54-
CMake version:
55-
Libc version:
56-
Python version:
57+
CUDA version:
58+
cuDNN version:
59+
Nvidia driver version:
60+
Nvidia driver List:
61+
****************************************
62+
validations:
63+
required: true
5764

58-
CUDA version:
59-
cuDNN version:
60-
Nvidia driver version:
61-
Nvidia driver List:
62-
****************************************
63-
validations:
64-
required: true
65-
66-
67-
- type: markdown
68-
attributes:
69-
value: >
70-
感谢你的贡献 🎉!Thanks for your contribution 🎉!
65+
- type: markdown
66+
attributes:
67+
value: >
68+
感谢你的贡献 🎉!Thanks for your contribution 🎉!

.github/ISSUE_TEMPLATE/4_documentation-issue.yml

+27-28
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@ description: 反馈一个官网文档错误。 Report an issue related to https:
33
labels: [type/docs, status/new-issue]
44

55
body:
6-
- type: markdown
7-
attributes:
8-
value: >
9-
#### 请确认反馈的问题来自PaddlePaddle官网文档:https://www.paddlepaddle.org.cn/ 。
6+
- type: markdown
7+
attributes:
8+
value: >
9+
#### 请确认反馈的问题来自PaddlePaddle官网文档:https://www.paddlepaddle.org.cn/ 。
1010
11-
#### Before submitting a Documentation Issue, Please make sure that issue is related to https://www.paddlepaddle.org.cn/.
11+
#### Before submitting a Documentation Issue, Please make sure that issue is related to https://www.paddlepaddle.org.cn/.
1212
13-
- type: textarea
14-
id: link
15-
attributes:
16-
label: 文档链接&描述 Document Links & Description
17-
description: |
18-
请说明有问题的文档链接以及该文档存在的问题。
19-
Please fill in the link to the document and describe the question.
20-
validations:
21-
required: true
13+
- type: textarea
14+
id: link
15+
attributes:
16+
label: 文档链接&描述 Document Links & Description
17+
description: |
18+
请说明有问题的文档链接以及该文档存在的问题。
19+
Please fill in the link to the document and describe the question.
20+
validations:
21+
required: true
2222

23+
- type: textarea
24+
id: error
25+
attributes:
26+
label: 请提出你的建议 Please give your suggestion
27+
description: |
28+
请告诉我们,你希望如何改进这个文档。或者你可以提个PR修复这个问题。[教程参考](https://github.com/PaddlePaddle/docs/wiki#%E8%B4%A1%E7%8C%AE%E6%96%87%E6%A1%A3)
29+
Please tell us how you would like to improve this document. Or you can submit a PR to fix this problem.
2330
24-
- type: textarea
25-
id: error
26-
attributes:
27-
label: 请提出你的建议 Please give your suggestion
28-
description: |
29-
请告诉我们,你希望如何改进这个文档。或者你可以提个PR修复这个问题。[教程参考](https://github.com/PaddlePaddle/docs/wiki#%E8%B4%A1%E7%8C%AE%E6%96%87%E6%A1%A3)
30-
Please tell us how you would like to improve this document. Or you can submit a PR to fix this problem.
31+
validations:
32+
required: false
3133

32-
validations:
33-
required: false
34-
35-
- type: markdown
36-
attributes:
37-
value: >
38-
感谢你的贡献 🎉!Thanks for your contribution 🎉!
34+
- type: markdown
35+
attributes:
36+
value: >
37+
感谢你的贡献 🎉!Thanks for your contribution 🎉!

0 commit comments

Comments
 (0)