Spaces:
Sleeping
Sleeping
File size: 3,214 Bytes
5cdf996 711b9b5 5cdf996 06aac03 5cd5f02 06aac03 5cd5f02 54e0639 5cd5f02 54e0639 5cd5f02 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 711b9b5 06aac03 711b9b5 06aac03 711b9b5 5cd5f02 06aac03 711b9b5 06aac03 711b9b5 5cd5f02 06aac03 711b9b5 06aac03 711b9b5 5cd5f02 06aac03 5cd5f02 54e0639 5cd5f02 54e0639 5cd5f02 06aac03 5cd5f02 cfe0896 5cd5f02 54e0639 5cd5f02 cfe0896 5cd5f02 cfe0896 711b9b5 cfe0896 711b9b5 54e0639 711b9b5 cfe0896 711b9b5 cfe0896 711b9b5 54e0639 5cd5f02 54e0639 711b9b5 54e0639 5cd5f02 06aac03 5cd5f02 06aac03 711b9b5 06aac03 5cd5f02 06aac03 711b9b5 06aac03 711b9b5 cfe0896 5cd5f02 06aac03 5cd5f02 711b9b5 06aac03 5cd5f02 06aac03 711b9b5 06aac03 5cd5f02 06aac03 711b9b5 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 5cd5f02 06aac03 711b9b5 5cd5f02 06aac03 5cd5f02 06aac03 711b9b5 cfe0896 5cd5f02 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | ---
title: Bug Triage OpenEnv
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
tags:
- openenv
---
# Bug Triage OpenEnv
A simple OpenEnv environment for real-world software bug triage. The agent must classify tickets, assign them to the right team, detect duplicates, request missing information, and escalate urgent incidents.
## Why this environment
This is a real workflow, not a toy task. Software teams do bug triage every day, and progress can be measured step by step.
The environment includes:
- Typed `Observation`, `Action`, `Reward`, and `State` models with Pydantic
- Standard OpenEnv methods: `reset()`, `step()`, and `state()`
- Three deterministic tasks: easy, medium, and hard
- Programmatic graders with scores in `[0.0, 1.0]`
- Dense rewards for partial progress
## Observation and action space
Observation includes:
- Current ticket details
- Queue stats
- Available teams and components
- Steps used and remaining
- Partial score and last action result
Actions supported:
- `classify`
- `assign`
- `mark_duplicate`
- `request_info`
- `defer`
- `close`
- `escalate_incident`
- `next_ticket`
## Tasks
### `bug_triage_easy`
- Difficulty: easy
- 8 tickets
- Mostly clear bug reports with minimal duplicates
### `bug_triage_medium`
- Difficulty: medium
- 15 tickets
- Mixed-quality reports with duplicates and missing information
### `bug_triage_hard`
- Difficulty: hard
- 25 tickets
- Noisy tickets with SLA pressure and escalation trade-offs
## Reward and grading
The reward function gives feedback during the episode, not only at the end.
It rewards:
- Correct severity, priority, and component classification
- Correct team assignment
- Correct duplicate handling
- Correct information requests
- Correct escalation of critical tickets
It penalizes:
- Invalid actions
- Repeated loop behavior
- Missing escalation on critical tickets
- Incorrect close or defer decisions
Each task has a deterministic grader in `openenv_bug_triage/grader.py`.
## Setup
Install dependencies:
```bash
python -m venv venv
```
Windows PowerShell:
```powershell
venv\Scripts\Activate.ps1
pip install -r requirements.txt
```
macOS/Linux:
```bash
source venv/bin/activate
pip install -r requirements.txt
```
Validate:
```bash
openenv validate
```
## Run locally
Start the API:
```bash
uvicorn server.app:app --host 0.0.0.0 --port 7860
```
Main endpoints:
- `GET /reset`
- `POST /reset`
- `POST /step`
- `GET /state`
- `GET /tasks`
- `GET /health`
## Baseline inference
Submission runner:
```bash
python inference.py
```
Deterministic offline baseline:
```powershell
$env:OPENENV_OFFLINE = "1"
venv\Scripts\python.exe scripts\baseline_inference.py --offline --seed 42
```
Current offline baseline scores:
| Task | Score |
| --- | ---: |
| `bug_triage_easy` | `0.9920` |
| `bug_triage_medium` | `0.6715` |
| `bug_triage_hard` | `0.6460` |
| Mean | `0.7698` |
The score artifact is saved to `artifacts/baseline_scores.json`.
## Docker and Hugging Face
Build:
```bash
docker build -t bug-triage-openenv .
```
Run:
```bash
docker run --rm -p 7860:7860 bug-triage-openenv
```
This repo is set up for a Docker-based Hugging Face Space and tagged with `openenv`.
|