Skip to content

Update bug report template, add env capture tools #1656

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 46 additions & 29 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
---
name: Bug report
about: Create a report to help us improve
name: 🐛 Bug report
about: Raise an issue here if you find a bug.
labels: bug

---

**Describe the bug**
A clear and concise description of what the bug is.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment**
Include all relevant environment information:
1. OS [e.g. Ubuntu 20.04]:
2. Python version [e.g. 3.7]:
3. LLM Compressor version or commit hash [e.g. 0.1.0, `f7245c8`]:
4. ML framework version(s) [e.g. torch 2.3.1]:
5. Other Python package versions [e.g. vLLM, compressed-tensors, numpy, ONNX]:
6. Other relevant environment information [e.g. hardware, CUDA version]:

**To Reproduce**
Exact steps to reproduce the behavior:


**Errors**
If applicable, add a full print-out of any errors or exceptions that are raised or include screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here. Also include any relevant files.
title: "[Bug]: "

body:
- type: markdown
attributes:
value: >
#### 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+).

#### ⚠️ 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).
- type: textarea
attributes:
label: ⚙️ Your current environment
description: |
Please run the following and paste the output below.
```bash
wget https://raw.githubusercontent.com/vllm-project/llm-compressor/main/tools/collect_env.py
# For security purposes, please feel free to check the contents of collect_env.py before running it.
python collect_env.py
```
value: |
<details>
<summary>The output of <code>python collect_env.py</code></summary>

```text
Your output of `python collect_env.py` here
```

</details>
validations:
required: true
- type: textarea
attributes:
label: 🐛 Describe the bug
description: |
Please provide a clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: 🛠️ Steps to reproduce
description: |
If applicable, please describe any steps required to reproduce. If you can share an applicable huggingface model stub, please do so here.
validations:
required: false
51 changes: 51 additions & 0 deletions tools/collect_env.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""
Script used to generate environment information for the purpose of
creating bug reports. See `.github/ISSUE_TEMPLATE/bug_report.md`
"""

import platform
import sys
import importlib

def get_version(pkg_name):
try:
return importlib.metadata.version(pkg_name)
except importlib.metadata.PackageNotFoundError:
return "None"

def get_torch_hardware_info():
try:
import torch
cuda_devices = []
amd_devices = []
if torch.cuda.is_available():
for i in range(torch.cuda.device_count()):
name = torch.cuda.get_device_name(i)
if "AMD" in name.upper():
amd_devices.append(name)
else:
cuda_devices.append(name)
return cuda_devices, amd_devices
except ImportError:
return [], []

def collect_environment_info():
cuda_devices, amd_devices = get_torch_hardware_info()

info = {
"Operating System": platform.platform(),
"Python Version": sys.version.replace("\n", " "),
"llm-compressor Version": get_version("llmcompressor"),
"compressed-tensors Version": get_version("compressed_tensors"),
"transformers Version": get_version("transformers"),
"torch Version": get_version("torch"),
"CUDA Devices": cuda_devices if cuda_devices else "None",
"AMD Devices": amd_devices if amd_devices else "None",
}

print("### Environment Information ###")
for key, value in info.items():
print(f"{key}: `{value}`")

if __name__ == "__main__":
collect_environment_info()