|
|
--- |
|
|
language: en |
|
|
tags: |
|
|
- bug-classification |
|
|
- severity-classification |
|
|
- software-engineering |
|
|
license: apache-2.0 |
|
|
datasets: |
|
|
- custom-github-issues |
|
|
pipeline_tag: text-classification |
|
|
--- |
|
|
|
|
|
# BugFlow Severity Classifier |
|
|
|
|
|
Fine-tuned CodeBERT model for classifying bug report severity levels. |
|
|
|
|
|
## Labels |
|
|
- **Low**: Minor issues, cosmetic changes |
|
|
- **Medium**: Standard bugs affecting some functionality |
|
|
- **High**: Important bugs affecting major functionality |
|
|
- **Critical**: System crashes, data loss, security issues |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from transformers import RobertaTokenizer, RobertaForSequenceClassification |
|
|
import torch |
|
|
|
|
|
model = RobertaForSequenceClassification.from_pretrained("YOUR_USERNAME/bugflow-severity-classifier") |
|
|
tokenizer = RobertaTokenizer.from_pretrained("YOUR_USERNAME/bugflow-severity-classifier") |
|
|
|
|
|
text = "Application crashes when clicking login button" |
|
|
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True) |
|
|
outputs = model(**inputs) |
|
|
probs = torch.softmax(outputs.logits, dim=1) |
|
|
labels = ['low', 'medium', 'high', 'critical'] |
|
|
predicted = labels[torch.argmax(probs).item()] |
|
|
print(f"Severity: {predicted}") |
|
|
``` |
|
|
|
|
|
## Training |
|
|
- Base model: microsoft/codebert-base |
|
|
- Dataset: Custom GitHub issues dataset + domain-specific bugs |
|
|
- Fine-tuned using Hugging Face Transformers |
|
|
|