Skip to content

Commit f6b4f49

Browse files
russellbmfournioux
authored andcommitted
[Doc] Move PR template content to docs (vllm-project#10159)
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Maxime Fournioux <55544262+mfournioux@users.noreply.github.com>
1 parent 2da16d7 commit f6b4f49

File tree

3 files changed

+126
-84
lines changed

3 files changed

+126
-84
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-70
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,4 @@ FILL IN THE PR DESCRIPTION HERE
22

33
FIX #xxxx (*link existing issues this PR will resolve*)
44

5-
**BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE**
6-
7-
---
8-
9-
<details>
10-
<!-- inside this <details> section, markdown rendering does not work, so we use raw html here. -->
11-
<summary><b> PR Checklist (Click to Expand) </b></summary>
12-
13-
<p>Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.</p>
14-
15-
<h3>PR Title and Classification</h3>
16-
<p>Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:</p>
17-
<ul>
18-
<li><code>[Bugfix]</code> for bug fixes.</li>
19-
<li><code>[CI/Build]</code> for build or continuous integration improvements.</li>
20-
<li><code>[Doc]</code> for documentation fixes and improvements.</li>
21-
<li><code>[Model]</code> for adding a new model or improving an existing model. Model name should appear in the title.</li>
22-
<li><code>[Frontend]</code> For changes on the vLLM frontend (e.g., OpenAI API server, <code>LLM</code> class, etc.) </li>
23-
<li><code>[Kernel]</code> for changes affecting CUDA kernels or other compute kernels.</li>
24-
<li><code>[Core]</code> for changes in the core vLLM logic (e.g., <code>LLMEngine</code>, <code>AsyncLLMEngine</code>, <code>Scheduler</code>, etc.)</li>
25-
<li><code>[Hardware][Vendor]</code> for hardware-specific changes. Vendor name should appear in the prefix (e.g., <code>[Hardware][AMD]</code>).</li>
26-
<li><code>[Misc]</code> for PRs that do not fit the above categories. Please use this sparingly.</li>
27-
</ul>
28-
<p><strong>Note:</strong> If the PR spans more than one category, please include all relevant prefixes.</p>
29-
30-
<h3>Code Quality</h3>
31-
32-
<p>The PR need to meet the following code quality standards:</p>
33-
34-
<ul>
35-
<li>We adhere to <a href="https://google.github.io/styleguide/pyguide.html">Google Python style guide</a> and <a href="https://google.github.io/styleguide/cppguide.html">Google C++ style guide</a>.</li>
36-
<li>Pass all linter checks. Please use <a href="https://github.com/vllm-project/vllm/blob/main/format.sh"><code>format.sh</code></a> to format your code.</li>
37-
<li>The code need to be well-documented to ensure future contributors can easily understand the code.</li>
38-
<li>Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.</li>
39-
<li>Please add documentation to <code>docs/source/</code> if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.</li>
40-
</ul>
41-
42-
<h3>Adding or changing kernels</h3>
43-
<p>Each custom kernel needs a schema and one or more implementations to be registered with PyTorch.</p>
44-
<ul>
45-
<li>Make sure custom ops are registered following PyTorch guidelines: <a href="https://pytorch.org/tutorials/advanced/cpp_custom_ops.html#cpp-custom-ops-tutorial">Custom C++ and CUDA Operators</a> and <a href="https://docs.google.com/document/d/1_W62p8WJOQQUzPsJYa7s701JXt0qf2OfLub2sbkHOaU">The Custom Operators Manual</a></li>
46-
<li>Custom operations that return <code>Tensors</code> require meta-functions. Meta-functions should be implemented and registered in python so that dynamic dims can be handled automatically. See above documents for a description of meta-functions.</li>
47-
<li>Use <a href="https://pytorch.org/docs/stable/library.html#torch.library.opcheck"><code>torch.libary.opcheck()</code></a> to test the function registration and meta-function for any registered ops. See <code>tests/kernels</code> for examples.</li>
48-
<li>When changing the C++ signature of an existing op, the schema must be updated to reflect the changes.</li>
49-
<li>If a new custom type is needed, see the following document: <a href="https://docs.google.com/document/d/18fBMPuOJ0fY5ZQ6YyrHUppw9FA332CpNtgB6SOIgyuA">Custom Class Support in PT2</a>.
50-
</ul>
51-
52-
<h3>Notes for Large Changes</h3>
53-
<p>Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with <code>rfc-required</code> and might not go through the PR.</p>
54-
55-
<h3>What to Expect for the Reviews</h3>
56-
57-
<p>The goal of the vLLM team is to be a <i>transparent reviewing machine</i>. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process: </p>
58-
59-
<ul>
60-
<li> After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.</li>
61-
<li> After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.</li>
62-
<li> After the review, the reviewer will put an <code> action-required</code> label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.</li>
63-
<li> Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.
64-
</li>
65-
</ul>
66-
67-
<h3>Thank You</h3>
68-
69-
<p> Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone! </p>
70-
71-
72-
</details>
73-
74-
5+
**BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing/overview.html **

.github/scripts/cleanup_pr_body.sh

+21-4
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,36 @@ NEW=/tmp/new_pr_body.txt
1515
gh pr view --json body --template "{{.body}}" "${PR_NUMBER}" > "${OLD}"
1616
cp "${OLD}" "${NEW}"
1717

18-
# Remove all lines after and including "**BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE**"
19-
sed -i '/\*\*BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE\*\*/,$d' "${NEW}"
20-
2118
# Remove "FIX #xxxx (*link existing issues this PR will resolve*)"
2219
sed -i '/FIX #xxxx.*$/d' "${NEW}"
2320

2421
# Remove "FILL IN THE PR DESCRIPTION HERE"
2522
sed -i '/FILL IN THE PR DESCRIPTION HERE/d' "${NEW}"
2623

24+
# Remove all lines after and including "**BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE**"
25+
sed -i '/\*\*BEFORE SUBMITTING, PLEASE READ.*\*\*/,$d' "${NEW}"
26+
27+
# Remove HTML <details> section that includes <summary> text of "PR Checklist (Click to Expand)"
28+
python3 - <<EOF
29+
import re
30+
31+
with open("${NEW}", "r") as file:
32+
content = file.read()
33+
34+
pattern = re.compile(r'(---\n\n)?<details>.*?<summary>.*?PR Checklist \(Click to Expand\).*?</summary>.*?</details>', re.DOTALL)
35+
content = re.sub(pattern, '', content)
36+
37+
with open("${NEW}", "w") as file:
38+
file.write(content)
39+
EOF
40+
2741
# Run this only if ${NEW} is different than ${OLD}
2842
if ! cmp -s "${OLD}" "${NEW}"; then
29-
echo "Updating PR body"
3043
gh pr edit --body-file "${NEW}" "${PR_NUMBER}"
44+
echo
45+
echo "Updated PR body:"
46+
echo
47+
cat "${NEW}"
3148
else
3249
echo "No changes needed"
3350
fi

docs/source/contributing/overview.rst

+104-10
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ Testing
4141
Contribution Guidelines
4242
=======================
4343

44-
DCO and Signed-off-by
45-
----------------------
46-
47-
When contributing changes to this project, you must agree to the `DCO <https://github.com/vllm-project/vllm/tree/main/DCO>`_.
48-
Commits must include a ``Signed-off-by:`` header which certifies agreement with
49-
the terms of the `DCO <https://github.com/vllm-project/vllm/tree/main/DCO>`_.
50-
51-
Using ``-s`` with ``git commit`` will automatically add this header.
52-
5344
Issues
5445
------
5546

@@ -61,7 +52,110 @@ If you encounter a bug or have a feature request, please `search existing issues
6152
Pull Requests & Code Reviews
6253
----------------------------
6354

64-
Please check the PR checklist in the `PR template <https://github.com/vllm-project/vllm/tree/main/.github/PULL_REQUEST_TEMPLATE.md>`_ for a detailed guide for contribution.
55+
Thank you for your contribution to vLLM! Before submitting the pull request,
56+
please ensure the PR meets the following criteria. This helps vLLM maintain the
57+
code quality and improve the efficiency of the review process.
58+
59+
DCO and Signed-off-by
60+
^^^^^^^^^^^^^^^^^^^^^
61+
62+
When contributing changes to this project, you must agree to the `DCO <https://github.com/vllm-project/vllm/tree/main/DCO>`_.
63+
Commits must include a ``Signed-off-by:`` header which certifies agreement with
64+
the terms of the `DCO <https://github.com/vllm-project/vllm/tree/main/DCO>`_.
65+
66+
Using ``-s`` with ``git commit`` will automatically add this header.
67+
68+
PR Title and Classification
69+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
70+
71+
Only specific types of PRs will be reviewed. The PR title is prefixed
72+
appropriately to indicate the type of change. Please use one of the following:
73+
74+
- ``[Bugfix]`` for bug fixes.
75+
- ``[CI/Build]`` for build or continuous integration improvements.
76+
- ``[Doc]`` for documentation fixes and improvements.
77+
- ``[Model]`` for adding a new model or improving an existing model. Model name
78+
should appear in the title.
79+
- ``[Frontend]`` For changes on the vLLM frontend (e.g., OpenAI API server,
80+
``LLM`` class, etc.)
81+
- ``[Kernel]`` for changes affecting CUDA kernels or other compute kernels.
82+
- ``[Core]`` for changes in the core vLLM logic (e.g., ``LLMEngine``,
83+
``AsyncLLMEngine``, ``Scheduler``, etc.)
84+
- ``[Hardware][Vendor]`` for hardware-specific changes. Vendor name should
85+
appear in the prefix (e.g., ``[Hardware][AMD]``).
86+
- ``[Misc]`` for PRs that do not fit the above categories. Please use this
87+
sparingly.
88+
89+
.. note::
90+
If the PR spans more than one category, please include all relevant prefixes.
91+
92+
Code Quality
93+
^^^^^^^^^^^^
94+
95+
The PR needs to meet the following code quality standards:
96+
97+
- We adhere to `Google Python style guide
98+
<https://google.github.io/styleguide/pyguide.html>`_ and `Google C++ style guide
99+
<https://google.github.io/styleguide/cppguide.html>`_.
100+
- Pass all linter checks. Please use `format.sh
101+
<https://github.com/vllm-project/vllm/blob/main/format.sh>`_ to format your
102+
code.
103+
- The code needs to be well-documented to ensure future contributors can easily
104+
understand the code.
105+
- Include sufficient tests to ensure the project stays correct and robust. This
106+
includes both unit tests and integration tests.
107+
- Please add documentation to ``docs/source/`` if the PR modifies the
108+
user-facing behaviors of vLLM. It helps vLLM users understand and utilize the
109+
new features or changes.
110+
111+
Adding or Changing Kernels
112+
^^^^^^^^^^^^^^^^^^^^^^^^^^
113+
114+
Each custom kernel needs a schema and one or more implementations to be registered with PyTorch.
115+
116+
- Make sure custom ops are registered following PyTorch guidelines:
117+
`Custom C++ and CUDA Operators <https://pytorch.org/tutorials/advanced/cpp_custom_ops.html#cpp-custom-ops-tutorial>`_
118+
and `The Custom Operators Manual <https://docs.google.com/document/d/1_W62p8WJOQQUzPsJYa7s701JXt0qf2OfLub2sbkHOaU>`_.
119+
- Custom operations that return ``Tensors`` require meta-functions.
120+
Meta-functions should be implemented and registered in Python so that dynamic
121+
dims can be handled automatically. See above documents for a description of
122+
meta-functions.
123+
- Use `torch.library.opcheck() <https://pytorch.org/docs/stable/library.html#torch.library.opcheck>`_
124+
to test the function registration and meta-function for any registered ops.
125+
See ``tests/kernels`` for examples.
126+
- When changing the C++ signature of an existing op, the schema must be updated
127+
to reflect the changes.
128+
- If a new custom type is needed, see the following document:
129+
`Custom Class Support in PT2 <https://docs.google.com/document/d/18fBMPuOJ0fY5ZQ6YyrHUppw9FA332CpNtgB6SOIgyuA>`_.
130+
131+
Notes for Large Changes
132+
^^^^^^^^^^^^^^^^^^^^^^^
133+
134+
Please keep the changes as concise as possible. For major architectural changes
135+
(>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue
136+
(RFC) discussing the technical design and justification. Otherwise, we will tag
137+
it with ``rfc-required`` and might not go through the PR.
138+
139+
What to Expect for the Reviews
140+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141+
142+
The goal of the vLLM team is to be a *transparent reviewing machine*. We would
143+
like to make the review process transparent and efficient and make sure no
144+
contributor feels confused or frustrated. However, the vLLM team is small, so we
145+
need to prioritize some PRs over others. Here is what you can expect from the
146+
review process:
147+
148+
- After the PR is submitted, the PR will be assigned to a reviewer. Every
149+
reviewer will pick up the PRs based on their expertise and availability.
150+
- After the PR is assigned, the reviewer will provide status updates every 2-3
151+
days. If the PR is not reviewed within 7 days, please feel free to ping the
152+
reviewer or the vLLM team.
153+
- After the review, the reviewer will put an ``action-required`` label on the PR
154+
if there are changes required. The contributor should address the comments and
155+
ping the reviewer to re-review the PR.
156+
- Please respond to all comments within a reasonable time frame. If a comment
157+
isn't clear or you disagree with a suggestion, feel free to ask for
158+
clarification or discuss the suggestion.
65159

66160
Thank You
67161
---------

0 commit comments

Comments
 (0)