Commit 8636830
feat: move trajectory logging from backend to frontend (#518)
* feat: move trajectory logging from backend to frontend (Model class)
Implements RFC #511 - moves trajectory persistence and metrics reporting
from the backend to the Model class, allowing backends to focus solely on training.
Key changes:
- Model.log() now handles parquet writing, metrics calculation, history.jsonl
- Model gains base_path and report_metrics attributes for configuration
- TrainableModel.train() calls log() first, then backend._train_model()
- TrainableModel.delete_checkpoints() reads history.jsonl locally
- Backend._log() removed; _delete_checkpoints() renamed to _delete_checkpoint_files()
- Removed scale_learning_rate_by_reward_std_dev handling (users can implement if needed)
Breaking changes:
- Backend interface: _log() removed, _delete_checkpoints() renamed
- ServerlessBackend: trajectories now saved locally instead of sent to API
Closes #511
* fix: sort imports in vllm/server.py
---------
Co-authored-by: Cursor Bot <bot@cursor.com>1 parent beb0315 commit 8636830
7 files changed
Lines changed: 755 additions & 343 deletions
File tree
- src/art
- local
- serverless
- vllm
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
| 65 | + | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 83 | | |
103 | 84 | | |
104 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| |||
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
0 commit comments