Spaces:
Sleeping

Aksh Parekh Claude Sonnet 4.6 commited on
Commit
71efc66
Β·
1 Parent(s): dd5f8b8

feat: continuous PPO training + live web dashboard

Browse files

- Replace server/app.py with FastAPI continuous training loop
- PPO training runs in background thread (no manual stepping)
- Live dashboard: 2D road canvas on left, reward chart + episode log on right
- SSE + polling for real-time updates (0.5s heartbeat)
- Capped reward mode: min(reward, 2.0) per step
- Uncapped reward mode: base + token_count * 0.001 (frontier LLM scaling)
- Toggle capped/uncapped via UI button or POST /api/mode
- Curriculum stage display with pip indicators
- PPO losses (pg/vf/entropy) shown live
- Dockerfile cleaned: removed openenv-core dep to avoid websockets conflict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

29 files changed +2490 -47
Files changed (29)
Dockerfile+18-6
README.md+1-1
__init__.py+5-1
models.py+10-1
policies/__init__.pyAdded+5
policies/__pycache__/__init__.cpython-314.pycAdded
Binary file (381 Bytes). View file
policies/__pycache__/base_policy.cpython-314.pycAdded
Binary file (4.05 kB). View file
policies/__pycache__/flat_mlp_policy.cpython-314.pycAdded
Binary file (3.71 kB). View file
policies/__pycache__/policy_spec.cpython-314.pycAdded
Binary file (18.4 kB). View file
policies/__pycache__/ticket_attention_policy.cpython-314.pycAdded
Binary file (11.3 kB). View file
policies/base_policy.pyAdded+66
policies/flat_mlp_policy.pyAdded+50
policies/policy_spec.pyAdded+409
policies/ticket_attention_policy.pyAdded+227
pyproject.toml+8
requirements.txtAdded+9
server/app.py+862-24
server/overflow_environment.py+48-14
server/policy_adapter.pyAdded+80
training/__init__.pyAdded
Empty file
training/__pycache__/__init__.cpython-314.pycAdded
Binary file (169 Bytes). View file
training/__pycache__/curriculum.cpython-314.pycAdded
Binary file (5.69 kB). View file
training/__pycache__/overflow_gym_env.cpython-314.pycAdded
Binary file (9.75 kB). View file
training/__pycache__/ppo_trainer.cpython-314.pycAdded
Binary file (20.6 kB). View file
training/__pycache__/reward.cpython-314.pycAdded
Binary file (3.47 kB). View file
training/curriculum.pyAdded+99
training/overflow_gym_env.pyAdded+170
training/ppo_trainer.pyAdded+329
training/reward.pyAdded+94