Commit efcad5d
feat(slime): add SlimeRunner as the Python entry point for training
Wraps train.sh + config.yaml + env vars behind a single Python class.
Users instantiate SlimeRunner with a handful of per-experiment fields
(exp_id, agent_runtime_arn, s3_bucket, model_dir, data_path,
model_type) and call .train(num_rollout=N); everything else has a
sensible default and an extra_flags escape hatch for slime / Megatron /
SGLang CLI passthrough.
Internally, .train() shells out to reproduce train.sh step-by-step:
stop stale sglang/ray, ray start --head, source the slime model
script, submit the slime training job via ray job submit. The toolkit
config (agent_runtime_arn, s3_bucket, exp_id, etc.) is written to a
temp YAML and passed via --custom-config-path so SlimeArtConfig.from_args
continues to read it.
train.sh stays in the repo as the low-level escape hatch and as the
reference for what the class replicates.
SETUP.md 3.4 now leads with the Python recipe; the bash recipe is
kept as "advanced / debugging."
Verified end-to-end on Qwen2.5-3B-Instruct + GSM8K with
.train(num_rollout=10): reward climbs 0.25 -> 0.68 over 10 rollouts,
all 10 train steps healthy, no failures.
Plan: docs/roadmap/committed/slime-runner-entrypoint.md.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 051d7df commit efcad5d
5 files changed
Lines changed: 513 additions & 21 deletions
File tree
- src/agentcore_rl_toolkit/backends/slime
- examples/math_agent
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
162 | 183 | | |
163 | 184 | | |
164 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
165 | 210 | | |
166 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
167 | 222 | | |
168 | 223 | | |
169 | 224 | | |
170 | 225 | | |
171 | 226 | | |
172 | 227 | | |
173 | 228 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 229 | + | |
184 | 230 | | |
185 | 231 | | |
186 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments