Spaces:
Sleeping
Sleeping
Vighnesh commited on
Commit ยท
d771897
1
Parent(s): 95dc191
Fix: add gradio to pyproject.toml deps, update README structure to match actual files
Browse files- README.md +24 -14
- pyproject.toml +1 -0
README.md
CHANGED
|
@@ -77,30 +77,38 @@ Rewards provide partial progress signals throughout the trajectory:
|
|
| 77 |
|
| 78 |
```
|
| 79 |
support_ticket_env/
|
| 80 |
-
โโโ __init__.py
|
| 81 |
-
โโโ models.py
|
| 82 |
-
โโโ tickets.py
|
| 83 |
-
โโโ graders.py
|
| 84 |
-
โโโ client.py
|
| 85 |
-
โโโ baseline.py
|
| 86 |
-
โโโ
|
| 87 |
-
โโโ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
โโโ server/
|
| 89 |
-
โโโ app.py
|
| 90 |
-
|
|
|
|
| 91 |
```
|
| 92 |
|
| 93 |
## Setup
|
| 94 |
|
| 95 |
```bash
|
| 96 |
# Install dependencies
|
| 97 |
-
pip install openenv-core fastapi uvicorn pydantic gradio openai
|
| 98 |
|
| 99 |
# Run locally
|
| 100 |
-
|
| 101 |
-
uvicorn server.app:app --host 0.0.0.0 --port 7860
|
| 102 |
|
| 103 |
-
# Docker
|
| 104 |
docker build -t support-ticket-env .
|
| 105 |
docker run -p 7860:7860 support-ticket-env
|
| 106 |
|
|
@@ -108,6 +116,8 @@ docker run -p 7860:7860 support-ticket-env
|
|
| 108 |
python run_tests.py
|
| 109 |
```
|
| 110 |
|
|
|
|
|
|
|
| 111 |
## Baseline Scores
|
| 112 |
|
| 113 |
Measured with `gpt-4o-mini`, seeds `[42, 7, 123]`:
|
|
|
|
| 77 |
|
| 78 |
```
|
| 79 |
support_ticket_env/
|
| 80 |
+
โโโ __init__.py # Package exports
|
| 81 |
+
โโโ models.py # SupportAction, SupportObservation, SupportState
|
| 82 |
+
โโโ tickets.py # Ticket dataset with ground-truth labels
|
| 83 |
+
โโโ graders.py # Reward/grader functions for all 3 tasks
|
| 84 |
+
โโโ client.py # EnvClient subclass
|
| 85 |
+
โโโ baseline.py # Baseline inference script
|
| 86 |
+
โโโ get_baseline.py # Fetch & save baseline results
|
| 87 |
+
โโโ gradio_ui.py # Interactive Gradio playground UI
|
| 88 |
+
โโโ make_chart.py # Plot training reward curves
|
| 89 |
+
โโโ plot_results.py # Visualise evaluation results
|
| 90 |
+
โโโ grpo_results.png # GRPO training results chart
|
| 91 |
+
โโโ reward_chart.png # Reward curve chart
|
| 92 |
+
โโโ openenv.yaml # Environment metadata
|
| 93 |
+
โโโ Dockerfile # Container definition
|
| 94 |
+
โโโ train_sft.ipynb # Step 1: SFT pre-training notebook
|
| 95 |
+
โโโ train_grpo.ipynb # Step 2: GRPO fine-tuning notebook
|
| 96 |
โโโ server/
|
| 97 |
+
โโโ app.py # FastAPI entry point (+ Gradio UI mounted at /playground)
|
| 98 |
+
โโโ support_environment.py # Environment logic
|
| 99 |
+
โโโ requirements.txt # Server dependencies
|
| 100 |
```
|
| 101 |
|
| 102 |
## Setup
|
| 103 |
|
| 104 |
```bash
|
| 105 |
# Install dependencies
|
| 106 |
+
pip install openenv-core fastapi uvicorn pydantic gradio openai pyyaml
|
| 107 |
|
| 108 |
# Run locally
|
| 109 |
+
uvicorn support_ticket_env.server.app:app --host 0.0.0.0 --port 7860
|
|
|
|
| 110 |
|
| 111 |
+
# Or via Docker
|
| 112 |
docker build -t support-ticket-env .
|
| 113 |
docker run -p 7860:7860 support-ticket-env
|
| 114 |
|
|
|
|
| 116 |
python run_tests.py
|
| 117 |
```
|
| 118 |
|
| 119 |
+
> ๐ฎ **Playground UI** available at `http://localhost:7860/playground` once the server is running.
|
| 120 |
+
|
| 121 |
## Baseline Scores
|
| 122 |
|
| 123 |
Measured with `gpt-4o-mini`, seeds `[42, 7, 123]`:
|
pyproject.toml
CHANGED
|
@@ -16,6 +16,7 @@ dependencies = [
|
|
| 16 |
"pydantic>=2.0.0",
|
| 17 |
"openai>=1.0.0",
|
| 18 |
"pyyaml>=6.0",
|
|
|
|
| 19 |
]
|
| 20 |
|
| 21 |
[project.optional-dependencies]
|
|
|
|
| 16 |
"pydantic>=2.0.0",
|
| 17 |
"openai>=1.0.0",
|
| 18 |
"pyyaml>=6.0",
|
| 19 |
+
"gradio>=4.0.0",
|
| 20 |
]
|
| 21 |
|
| 22 |
[project.optional-dependencies]
|