yashash04 commited on
Commit
2c70741
Β·
1 Parent(s): 2464e9e

docs: add TRAINING_LOG.md template + training_logs dir for Phase 13 discipline

Browse files
Files changed (3) hide show
  1. BUILD_LOG.md +302 -0
  2. TRAINING_LOG.md +454 -0
  3. training_logs/.gitkeep +0 -0
BUILD_LOG.md ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SchemaShift Build Log
2
+
3
+ Running log of everything built, tested, trained, and deployed. Append-only β€” never delete.
4
+
5
+ **Team Tripod:** Yashash Sheshagiri (lead), Gajanand V Dhayagode, Likith B S
6
+ **Event:** Meta Γ— HF Γ— PyTorch OpenEnv Hackathon 2026 Β· Round 2 Β· Bangalore Β· April 25-26
7
+
8
+ ---
9
+
10
+ ## PHASES COMPLETED
11
+
12
+ ### Phase 0 β€” Project Scaffolding
13
+ - **Date:** Tuesday April 21, 2026 (evening)
14
+ - **Commit:** `d4ab0f1`
15
+ - **Tests:** 0 (scaffolding only β€” no logic yet)
16
+ - **Time:** ~30 min
17
+ - **Notes:** 29 files created. Python venv built. Deps installed cleanly (fastapi 0.136, pydantic 2.13, openai 2.32, openenv-core 0.2.3, gradio 6.13). Repo pushed to https://github.com/Yashash4/SchemaShift.
18
+
19
+ ### Phase 1 β€” Pydantic Models
20
+ - **Date:** Tuesday April 21, 2026
21
+ - **Commit:** `8cdb02b`
22
+ - **Tests:** 6 passing (0.22s runtime)
23
+ - **Line counts:** models.py = 135 lines, test_models.py = ~120 lines
24
+ - **Time:** ~20 min
25
+ - **Judgment calls:**
26
+ 1. 12 classes + 2 Literal type aliases (not 13 classes as prompt suggested)
27
+ - **Notes:** Spec code copied verbatim. No deviations.
28
+
29
+ ### Phase 2 β€” Mail Tool
30
+ - **Date:** Tuesday April 21, 2026
31
+ - **Commit:** `8410ff1`
32
+ - **Tests:** 7 new (13 total), 0.16s runtime
33
+ - **Line counts:** tools/base.py = 60, tools/mail.py = 121, tests/test_mail.py = 149
34
+ - **Time:** ~90 min
35
+ - **Judgment calls:**
36
+ 1. Absolute imports (`from models import`) over relative imports β€” matches Phase 1 convention
37
+ 2. `get_schema()` returns `{}` for unknown endpoints post-deprecation
38
+ 3. 501 fallback in `BaseTool.call` for schema-without-handler (dev-time safety)
39
+ 4. `messages.send` is deep-copy rename of `send_message` after deprecation drift
40
+ 5. Pagination tokens: `"tok_xyz"` / `"cur_abc123"` when >10 results, `None` otherwise
41
+ - **Notes:** 3 endpoints (list_messages, send_message, get_message), 3 drifts (field_rename, endpoint_deprecation, new_required_param).
42
+
43
+ ### Phase 3 β€” Calendar Tool + DriftInjector
44
+ - **Date:** Tuesday April 21, 2026
45
+ - **Commit:** `27dd958`
46
+ - **Tests:** 10 new (23 total), 0.24s runtime
47
+ - **Line counts:** tools/calendar.py = 164, drift.py = 28, tests/test_calendar.py = 182, tests/test_drift.py = 122
48
+ - **Time:** ~100 min
49
+ - **Judgment calls:**
50
+ 1. Overlap predicate for `list_events` (inclusive both sides, ISO string sort)
51
+ 2. `_create_event` handles both attendees and participants gracefully
52
+ 3. `_update_event` accepts both attendees and participants (no second drift handler needed)
53
+ 4. Cancelled events remain in storage (matches Google/Outlook behavior)
54
+ 5. `_fired` sentinel in `event.details` (underscore prefix avoids collision)
55
+ 6. `rate_limit_tightening` chosen for unknown-drift test (semantically meaningful)
56
+ - **Notes:** 4 endpoints (list/create/update/delete_event), 2 drifts (field_rename attendees→participants, tool_removal delete_event). DriftInjector is stateless.
57
+
58
+ ### Phase 4 β€” CRM Tool + Scenarios E1/E2/E3
59
+ - **Date:** Tuesday April 21, 2026
60
+ - **Commit:** `bc8f184`
61
+ - **Tests:** 11 new (34 total), 0.24s runtime
62
+ - **Line counts:** tools/crm.py = 213, scenarios.py = 124, tests/test_crm.py = 142, tests/test_scenarios.py = 65
63
+ - **Time:** ~100 min
64
+ - **Judgment calls:**
65
+ 1. Strict param validation in `BaseTool.call` β€” rejects unknown params with 400 "Unknown params" (matches Stripe/Google API behavior)
66
+ 2. Internal storage stays `customer_email`; projection on read via `_project_contact`
67
+ 3. `search_contacts()` with no filters returns ALL contacts (REST convention)
68
+ 4. Rate-limit counter resets on drift fire (pre-drift calls don't count against post-drift budget)
69
+ 5. Drift-order commutativity for `contacts.patch` (either order produces same final state)
70
+ 6. E2 task description doesn't disclose deprecation (agent must discover via 410 response)
71
+ 7. E3 drift fires at step 2 (gives agent one clean baseline call)
72
+ 8. `DriftEvent.details` populated with hints (`from`, `to`) for grader/scenario auditing
73
+ - **Notes:** 4 endpoints (search/get/create/update_contact), 3 drifts (tool-wide field_rename, rate_limit_tightening, endpoint_deprecation update→contacts.patch).
74
+
75
+ ### Phase 5 β€” Composable Grader + Dense Step Shaping
76
+ - **Date:** Tuesday April 21, 2026
77
+ - **Commit:** `46b8c56`
78
+ - **Tests:** 11 new (45 total), 0.25s runtime
79
+ - **Line counts:** graders.py = 267, tests/test_graders.py = 224
80
+ - **Time:** ~150 min
81
+ - **Judgment calls:**
82
+ 1. Binary threshold 0.95 (not 1.0) β€” floating point safety
83
+ 2. `AdaptationRubric` iterates all fired drifts (TODO: revisit for Phase 11 M-scenarios with multi-drift-per-tool)
84
+ 3. `_final_state_acceptable` lenient mid-episode, strict at terminal β€” preserves training signal
85
+ 4. `compute_step_shaping` checks `not d.detected_by_agent` β€” anti-farming guard
86
+ 5. Dumb-retry penalty requires same tool AND same endpoint
87
+ 6. `assert` for weight-sum invariant (dev-time, not runtime)
88
+ 7. Rubric names coupled to `RewardBreakdown` field names (intentional reward contract)
89
+ 8. Bonus test asserts `step_shaping = 0` in grader output (env fills it, not grader)
90
+ - **Notes:** 4 rubrics (Completion, DriftDetection, Adaptation, Efficiency) + 2 gates (catastrophic, correct_final) + WeightedSum + Gate + `compute_step_shaping` + `build_grader`.
91
+
92
+ ### Phase 6 β€” Environment Scheduler
93
+ - **Date:** Tuesday April 21, 2026
94
+ - **Commit:** `c618a61`
95
+ - **Tests:** 8 new (53 total), 0.29s runtime
96
+ - **Line counts:** server/environment.py = 363, tests/test_environment.py = 242
97
+ - **Time:** ~120 min
98
+ - **E1 FULL-EPISODE BENCHMARK:**
99
+ - `shaped_total = 0.934375` (expected ~0.93, exact match on weighted sum)
100
+ - `task_completion = 1.0`
101
+ - `drift_detection = 1.0`
102
+ - `adaptation_quality = 1.0`
103
+ - `efficiency = 0.5625` (used 7 of 8 max steps)
104
+ - `catastrophic_gate = 1.0, correct_final_gate = 1.0`
105
+ - `binary = 1.0`
106
+ - `cumulative_reward = 4.2975` across 7 steps
107
+ - **Dense shaping fired correctly:** +0.10 at step 4 (inspect-after-failure), +0.15 at step 6 (drift report)
108
+ - **Judgment calls:**
109
+ 1. Shaping-before-marking ordering: dispatch→compute_step_shaping→mark detected→grader
110
+ 2. `tokens_used` clamped to non-negative with `max(0, remaining - tokens_used)`
111
+ 3. Lazy tool imports in `_instantiate_tool` β€” stretch tools don't break core
112
+ 4. `deepcopy(drift_plan)` on reset β€” prevents state leak across episodes
113
+ 5. Observation history windowed to last 5 steps for LLM prompt budget
114
+ 6. Calendar body parser handles both attendees (strings) and participants (dicts)
115
+ 7. `_completion_summary` stored with underscore prefix (no GT key collision)
116
+ 8. E2 three-recipient check tracked in `_update_agent_state`
117
+ 9. `done` flag set AFTER dispatch but BEFORE grader (enables strict gate at terminal)
118
+ 10. Dispatch returns `None` for `report_drift` and `complete_task` (no tool response)
119
+ - **Notes:** Round 1 `_engine is None` bug pattern explicitly prevented via `RuntimeError` in step() when state is None.
120
+
121
+ ### Phase 7 β€” FastAPI Server + Docker
122
+ - **Date:** Tuesday April 21, 2026 (late evening)
123
+ - **Commit:** `cb33205`
124
+ - **Tests:** 10 new (63 total), 0.94s runtime
125
+ - **Line counts:** server/app.py = 120, tests/test_server.py = 129, Dockerfile = 14, openenv.yaml = 14
126
+ - **Time:** ~60 min
127
+ - **Live server smoke tests:** uvicorn on 127.0.0.1:7860 verified /health, /tasks (count=3), /reset (E1 β†’ step=0, tools=['mail', 'calendar']) all 200 OK
128
+ - **`pip install -e .` confirmation:** Editable wheel built successfully. Docker container will resolve absolute imports correctly.
129
+ - **Judgment calls:**
130
+ 1. Removed root `__init__.py` β€” conflict with `py-modules` in pyproject
131
+ 2. `py-modules` + `packages` split in pyproject (preserves `from models import` convention)
132
+ 3. Dropped unused imports from spec's server code
133
+ 4. TestClient monkeypatch fixture β€” fresh env per test prevents cross-contamination
134
+ 5. `/step` catches `RuntimeError` β†’ 400 not 500 (client bug not server bug)
135
+ 6. Read-only endpoints (`/state`, `/grader`) don't auto-reset
136
+ 7. `/tasks` trims description to 120 chars (lightweight listing)
137
+ 8. No CORS middleware yet (defer to Phase 10 if needed)
138
+ 9. Hardcoded version "0.1.0" in two places (pragmatic duplication)
139
+ 10. `urllib.request` for smoke test (Windows-safe, no curl dependency)
140
+ - **Notes:** Endpoints: /, /health, /reset, /step, /state, /tasks, /grader. Port 7860 for HF Spaces compatibility.
141
+
142
+ ### Phase 8 β€” Env Client + Training Skeleton
143
+ - **Status:** NOT YET STARTED
144
+ - **Assigned to:** Yashash (lead) with Gajanand reviewing Kaggle notebook
145
+ - **Expected time:** ~2-2.5 hours
146
+ - (To be filled in on completion)
147
+
148
+ ---
149
+
150
+ ## PHASES REMAINING
151
+
152
+ - [ ] Phase 8 β€” Env client + training skeleton
153
+ - [ ] Phase 9 β€” Baseline eval (heuristics + 3 LLMs + GPT-4o-mini)
154
+ - [ ] Phase 10 β€” HF Space deploy
155
+ - [ ] Phase 11 β€” Medium scenarios (M1/M2/M3)
156
+ - [ ] Phase 12 β€” Insurance video recording (2 videos: 60s + 2min)
157
+ - [ ] Phase 13 β€” Kaggle training runs (Stage 1 single account β†’ Stage 2 parallelize)
158
+ - [ ] Phase 14 β€” Pitch + blog + video
159
+ - [ ] Phase 15 β€” Onsite Saturday-Sunday
160
+
161
+ ---
162
+
163
+ ## TRAINING RUNS
164
+
165
+ (Will be populated during Phase 13. Template for each run below.)
166
+
167
+ ### Run 1 β€” Account [N] β€” [Person] β€” [Date Time]
168
+ - **Model:** Qwen 2.5 1.5B Instruct OR Qwen 2.5 Coder 1.5B Instruct
169
+ - **Reward variant:** binary / shaped_total / shaped_total+procedural
170
+ - **Scenario set:** deterministic / procedural
171
+ - **LoRA config:** r=16, alpha=32, targets=[q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj]
172
+ - **GRPO config:** lr=5e-6, num_generations=4, max_completion_length=1536, gradient_accumulation=4, max_steps=100
173
+ - **Start time:**
174
+ - **End time:**
175
+ - **Steps completed:**
176
+ - **First batch mean reward:**
177
+ - **Final mean reward:**
178
+ - **Delta:**
179
+ - **Checkpoint HF Hub ID:**
180
+ - **Eval E1 score:**
181
+ - **Eval E2 score:**
182
+ - **Eval E3 score:**
183
+ - **Reward curve image:** `training_logs/run_N.png`
184
+ - **Errors / stops:**
185
+ - **Notes:**
186
+
187
+ ---
188
+
189
+ ## EVAL RUNS
190
+
191
+ (Will be populated during Phase 9. Template below.)
192
+
193
+ ### Eval [baseline_name] β€” [Date]
194
+ - **Model:** e.g., naive_heuristic, policy_aware_heuristic, Qwen 2.5 7B, Llama 3.1 8B, GPT-4o-mini, Qwen 2.5 1.5B (trained)
195
+ - **Seeds:** 5 per task
196
+ - **E1_onboard_new_hire avg:**
197
+ - **E2_meeting_invite_blast avg:**
198
+ - **E3_customer_lookup avg:**
199
+ - **Full raw scores table:**
200
+
201
+ | Task | Seed | Completion | DriftDetection | Adaptation | Efficiency | Shaped | Binary |
202
+ |------|------|------------|----------------|------------|------------|--------|--------|
203
+ | E1 | 0 | | | | | | |
204
+ | E1 | 1 | | | | | | |
205
+ | ... | | | | | | | |
206
+
207
+ - **Failure examples:**
208
+ 1. Action JSON + Response JSON
209
+ 2. ...
210
+ 3. ...
211
+
212
+ ---
213
+
214
+ ## DEPLOYMENTS
215
+
216
+ (Will be populated during Phase 10+.)
217
+
218
+ ### Deploy v[N] β€” [Date]
219
+ - **Target:** HF Space / local / Kaggle
220
+ - **Commit:**
221
+ - **URL:**
222
+ - **Health check:**
223
+ - **Config secrets set:**
224
+ - **Notes:**
225
+
226
+ ---
227
+
228
+ ## DECISIONS LOG (strategic, append-only)
229
+
230
+ ### Tuesday ~9 PM β€” Domain lock-in
231
+ - **Decision:** Schema Drift Adaptation Arena (SaaS Admin Workflows)
232
+ - **Rationale:** Direct Patronus sub-theme hit; Scaler secondary; no competitor finalist has it; authentic to Yashash's APEX OS/VisionX experience; cleanest before/after RL story
233
+
234
+ ### Tuesday ~10 PM β€” Staged Kaggle approach (v2.3)
235
+ - **Decision:** Run ONE Kaggle account (Gajanand/Account 2, main config) first. Parallelize only if Stage 1 converges.
236
+ - **Rationale:** If reward function or parser has a bug, 3 simultaneous accounts waste 3Γ— GPU quota. Debug once on one account. Main config = primary pitch claim, so prove that first.
237
+
238
+ ### Tuesday ~10 PM β€” Qwen 2.5 Coder 1.5B ablation on Account 3 (v2.2)
239
+ - **Decision:** Account 3 uses Coder-1.5B instead of same model + curriculum only.
240
+ - **Rationale:** More informative ablation β€” tests whether code-pretraining helps schema-adaptation learning. Gives blog/pitch a secondary result regardless of outcome.
241
+
242
+ ### Tuesday ~10 PM β€” Two videos in Phase 12 (v2.1)
243
+ - **Decision:** Produce 60-second core cut + 2-minute full version, not one 90-second video.
244
+ - **Rationale:** 60s fits pitch timing with hook+close room. 2min fits HF blog context depth. Recording once (Thursday), using twice.
245
+
246
+ ### Tuesday ~10 PM β€” One-sentence pitch opener (v2.1)
247
+ - **Decision:** Open README/pitch/video with: *"SchemaShift teaches agents to recover when the tool schema changes under them."*
248
+ - **Rationale:** Gallery winners (Kube SRE Gym, GAIA) lead with one-sentence claims. Judges remember one clean idea, not four themes.
249
+
250
+ ### Tuesday ~10 PM β€” Procedural drift scheduler on Account 3 (v2.1)
251
+ - **Decision:** Account 3 variant adds ~30 LOC scheduler that rotates drift steps and adds secondary drift after step 150.
252
+ - **Rationale:** Kube SRE Gym uses Claude-powered adversarial designer; we achieve similar curriculum story without API credit burn.
253
+
254
+ ---
255
+
256
+ ## REJECTED IDEAS (do not revive β€” posterity record)
257
+
258
+ ### Validator / oversight agent β€” rejected Tuesday
259
+ - **Why rejected:** Would break 63 passing tests, adds scope at wrong phase, theme-benefit marginal (multi-agent claim already defensible via scripted tool servers)
260
+
261
+ ### Uncertainty injection across failure types β€” rejected Tuesday
262
+ - **Why rejected:** Dilutes pitch (becomes "uncertainty" not "schema drift"), risks GRPO convergence by introducing probabilistic reward, already solved by dense shaping + policy-aware heuristic baseline proving non-gameability
263
+
264
+ ### Claude-powered adversarial drift designer β€” rejected Tuesday
265
+ - **Why rejected:** Time sink, API credit burn, provides marginal benefit over procedural scheduler
266
+
267
+ ### Pivot to "decision-making under uncertainty" framing β€” rejected Tuesday
268
+ - **Why rejected:** Breaks Patronus sub-theme fit, muddies demo story, opens scope unnecessarily
269
+
270
+ ### Qwen3 family migration (primary training) β€” rejected Tuesday
271
+ - **Why rejected:** Newer but less stable, prompt-behavior churn, migration risk for 48-hour build. Stick with Qwen 2.5 1.5B.
272
+
273
+ ### 3B+ primary model β€” rejected Tuesday
274
+ - **Why rejected:** Slow iteration (2x fewer experiments per Kaggle hour), tight T4 memory, doesn't improve pitch. "1.5B beats GPT-4o-mini" is a stronger claim than "3B beats GPT-4o-mini".
275
+
276
+ ---
277
+
278
+ ## OPEN QUESTIONS / TODOS
279
+
280
+ - [ ] Phase 8: verify step_shaping survives HTTP serialization roundtrip
281
+ - [ ] Phase 9: do baseline LLMs hit at least 0.30 on drifted E1? (if too high, env is too easy)
282
+ - [ ] Phase 10: deploy to HF Space, verify remote /health works
283
+ - [ ] Phase 11: when adding M1/M2/M3, verify AdaptationRubric denominator still makes sense (flagged in Phase 5 judgment call #2)
284
+ - [ ] Phase 13 Stage 1: go/no-go decision at 20 steps β€” document the reward curve image
285
+ - [ ] Phase 14: draft strong-claim and softer-claim versions of pitch, pick based on training results
286
+ - [ ] Phase 15 onsite: bring a backup video file on USB in case HF Space is slow to load
287
+
288
+ ---
289
+
290
+ ## ONSITE LOGISTICS
291
+
292
+ **Event:** Saturday-Sunday April 25-26, 2026 Β· SST Campus Bangalore
293
+ **Travel:** (add details)
294
+ **Accommodation:** (add details)
295
+ **Equipment to bring:**
296
+ - 2 laptops (primary + backup)
297
+ - USB with video files + repo backup
298
+ - HDMI adapter for presentation
299
+ - Chargers + extension cord
300
+ - Both phones with hotspot capability (in case venue wifi fails)
301
+
302
+ ---
TRAINING_LOG.md ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SchemaShift Training Log
2
+
3
+ **Purpose:** Immutable record of every training run, every checkpoint, every evaluation. Append-only. Never edit existing entries. If a number turns out wrong later, add a correction note below it β€” never overwrite.
4
+
5
+ **Why this log exists:** By Sunday pitch you will quote numbers. "Our 1.5B model improved from 0.15 to 0.78 on drifted E1." "We trained for 100 steps over 2.5 hours." "Binary-only reward failed to converge; shaped reward converged in 60 steps." Every single one of these claims requires logged data. Memory will not survive five days of continuous building. Write it down now or rebuild it from bad memory on Sunday morning.
6
+
7
+ **Team:** Tripod (Yashash / Gajanand / Likith)
8
+ **Event:** Meta Γ— HF Γ— PyTorch OpenEnv Hackathon Β· Round 2 Β· April 25-26, 2026
9
+
10
+ ---
11
+
12
+ ## HOW TO USE THIS LOG
13
+
14
+ Four sections below, each append-only:
15
+
16
+ 1. **PRE-TRAINING BASELINES** β€” untrained model scores (the "before" number for the pitch)
17
+ 2. **TRAINING RUNS** β€” every run you attempt, successful or failed, with per-checkpoint data
18
+ 3. **CHECKPOINT EVALS** β€” every eval you run against any checkpoint (linked by checkpoint ID)
19
+ 4. **HEAD-TO-HEAD COMPARISONS** β€” the tables that will go in the blog / pitch
20
+
21
+ **Logging frequency during Phase 13:**
22
+ - Before any training run starts: full baseline eval against the untrained model
23
+ - Every 25 GRPO steps during training: checkpoint auto-saves, run eval against it
24
+ - After training completes: full eval + reward curve screenshot + judgment notes
25
+ - After each eval run on any baseline LLM: add to CHECKPOINT EVALS section
26
+ - End of Thursday: fill in first HEAD-TO-HEAD table with everything you have so far
27
+
28
+ ---
29
+
30
+ ## 1. PRE-TRAINING BASELINES
31
+
32
+ These are the "before" numbers. Every trained checkpoint gets compared against these.
33
+
34
+ ### Baseline β€” UNTRAINED Qwen 2.5 1.5B Instruct (base model, no training)
35
+
36
+ - **Evaluated:** [DATE/TIME β€” fill in before Stage 1 training starts]
37
+ - **Seeds:** 0, 1, 2, 3, 4 (five per task)
38
+ - **Scenarios:** E1_onboard_new_hire, E2_meeting_invite_blast, E3_customer_lookup
39
+ - **Eval runner:** `python eval.py --baseline untrained_qwen_1.5b_instruct --seeds 0,1,2,3,4`
40
+
41
+ #### Per-seed raw scores
42
+
43
+ | Task | Seed | Completion | DriftDetection | Adaptation | Efficiency | Shaped | Binary |
44
+ |------|------|------------|----------------|------------|------------|--------|--------|
45
+ | E1 | 0 | | | | | | |
46
+ | E1 | 1 | | | | | | |
47
+ | E1 | 2 | | | | | | |
48
+ | E1 | 3 | | | | | | |
49
+ | E1 | 4 | | | | | | |
50
+ | E2 | 0 | | | | | | |
51
+ | E2 | 1 | | | | | | |
52
+ | E2 | 2 | | | | | | |
53
+ | E2 | 3 | | | | | | |
54
+ | E2 | 4 | | | | | | |
55
+ | E3 | 0 | | | | | | |
56
+ | E3 | 1 | | | | | | |
57
+ | E3 | 2 | | | | | | |
58
+ | E3 | 3 | | | | | | |
59
+ | E3 | 4 | | | | | | |
60
+
61
+ #### Aggregates
62
+
63
+ - **E1 mean shaped_total:**
64
+ - **E2 mean shaped_total:**
65
+ - **E3 mean shaped_total:**
66
+ - **Overall mean shaped_total:**
67
+ - **Overall binary rate (fraction of episodes that hit binary=1.0):**
68
+
69
+ #### Behavioral observations
70
+
71
+ What did the untrained model consistently do wrong? Quote 3 specific failure patterns:
72
+
73
+ 1.
74
+ 2.
75
+ 3.
76
+
77
+ #### Failure examples (paste full Action + Response JSON for 3 bad actions)
78
+
79
+ Example 1 β€” [scenario, seed, step number]:
80
+ ```json
81
+ {"action": ..., "response": ...}
82
+ ```
83
+ Commentary: what was wrong
84
+
85
+ Example 2 β€” [scenario, seed, step number]:
86
+ ```json
87
+ {"action": ..., "response": ...}
88
+ ```
89
+ Commentary: what was wrong
90
+
91
+ Example 3 β€” [scenario, seed, step number]:
92
+ ```json
93
+ {"action": ..., "response": ...}
94
+ ```
95
+ Commentary: what was wrong
96
+
97
+ #### Runtime
98
+
99
+ - Total eval time: X minutes
100
+ - Kaggle GPU used: yes/no, which account
101
+ - Cost: X GPU-hours
102
+
103
+ ---
104
+
105
+ ### Baseline β€” UNTRAINED Qwen 2.5 Coder 1.5B Instruct (for v2.2 ablation)
106
+
107
+ (Same structure as above β€” fill in before Account 3 Stage 2 training starts)
108
+
109
+ - **Evaluated:** [DATE/TIME]
110
+ - **Seeds:** 0, 1, 2, 3, 4
111
+
112
+ (Fill the same per-seed table, aggregates, observations, failures, runtime.)
113
+
114
+ ---
115
+
116
+ ### Baseline β€” naive_heuristic
117
+
118
+ A dumb policy that always calls the first endpoint of the first tool. Proves the environment cannot be trivially solved.
119
+
120
+ - **Evaluated:** [DATE/TIME]
121
+ - **Seeds:** 0, 1, 2, 3, 4
122
+
123
+ (Fill table + aggregates.)
124
+
125
+ ---
126
+
127
+ ### Baseline β€” policy_aware_heuristic
128
+
129
+ A smarter rule-based policy: on 4xx/5xx response, call inspect_schema next. Upper bound for non-RL solutions.
130
+
131
+ - **Evaluated:** [DATE/TIME]
132
+ - **Seeds:** 0, 1, 2, 3, 4
133
+
134
+ (Fill table + aggregates.)
135
+
136
+ ---
137
+
138
+ ### Baseline β€” Qwen 2.5 7B Instruct (via HF router)
139
+
140
+ Larger-but-still-small LLM baseline. Should do better than 1.5B untrained but worse than trained 1.5B.
141
+
142
+ - **Evaluated:** [DATE/TIME]
143
+ - **Seeds:** 0, 1, 2, 3, 4
144
+ - **API provider:** HF Inference Router
145
+
146
+ (Fill table + aggregates.)
147
+
148
+ ---
149
+
150
+ ### Baseline β€” Llama 3.1 8B Instruct (via HF router)
151
+
152
+ Meta's comparable-size baseline.
153
+
154
+ - **Evaluated:** [DATE/TIME]
155
+ - **Seeds:** 0, 1, 2, 3, 4
156
+ - **API provider:** HF Inference Router
157
+
158
+ (Fill table + aggregates.)
159
+
160
+ ---
161
+
162
+ ### Baseline β€” GPT-4o-mini (the pitch target)
163
+
164
+ The frontier proxy we need to beat. This is THE number to beat.
165
+
166
+ - **Evaluated:** [DATE/TIME]
167
+ - **Seeds:** 0, 1, 2, 3, 4
168
+ - **API provider:** OpenAI
169
+ - **Cost:** $X.XX in API credits
170
+
171
+ (Fill table + aggregates.)
172
+
173
+ **PITCH-CRITICAL NOTE:** GPT-4o-mini's score on E1 is the headline comparison. If Qwen 1.5B + SchemaShift beats this number, we have the pitch. If not, we reframe to "trained small model beats untrained baseline" which is weaker.
174
+
175
+ ---
176
+
177
+ ## 2. TRAINING RUNS
178
+
179
+ Every training attempt, successful or failed. Number them sequentially across the team.
180
+
181
+ ### Run 1 β€” Account 2 (Gajanand) β€” STAGE 1 MAIN β€” [Date Time start]
182
+
183
+ **This is Stage 1 β€” the pipeline-validation run. Critical go/no-go for Stage 2.**
184
+
185
+ #### Config snapshot (immutable β€” record exactly what was used)
186
+
187
+ - **Model:** Qwen 2.5 1.5B Instruct (`Qwen/Qwen2.5-1.5B-Instruct`)
188
+ - **Reward variant:** `return reward.shaped_total` (full: rubric + dense step shaping + gates)
189
+ - **Scenario set:** deterministic (original SCENARIOS from scenarios.py, no procedural scheduler)
190
+ - **LoRA config:**
191
+ - r: 16
192
+ - lora_alpha: 32
193
+ - lora_dropout: 0.0
194
+ - target_modules: `["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]`
195
+ - **GRPO config:**
196
+ - learning_rate: 5e-6
197
+ - num_generations: 4
198
+ - max_completion_length: 1536
199
+ - per_device_train_batch_size: 1
200
+ - gradient_accumulation_steps: 4
201
+ - logging_steps: 5
202
+ - save_steps: 25
203
+ - max_steps: 100
204
+ - use_vllm: true, vllm_mode: colocate
205
+ - **Quantization:** 4-bit via Unsloth
206
+ - **Hardware:** Kaggle T4 x2 (or P100 fallback β€” note which)
207
+ - **SchemaShift env URL:** [HF Space URL from Phase 10]
208
+ - **Commit hash of repo at training time:**
209
+
210
+ #### Pre-training check (Cells 1-8 verification before Cell 9)
211
+
212
+ - [ ] Model loaded without OOM: yes/no, peak GPU memory: X GB
213
+ - [ ] env_client.health() returned True: yes/no
214
+ - [ ] Sample reward_fn call with dummy completion returned float: yes/no, value: X
215
+ - [ ] parse_completion_to_actions test on realistic Qwen output succeeded: yes/no
216
+
217
+ #### Per-batch reward log (first 20 steps, critical go/no-go)
218
+
219
+ | Step | Timestamp | Mean reward | Min | Max | Notes |
220
+ |------|-----------|-------------|-----|-----|-------|
221
+ | 1 | | | | | |
222
+ | 2 | | | | | |
223
+ | 3 | | | | | |
224
+ | 4 | | | | | |
225
+ | 5 | | | | | |
226
+ | 10 | | | | | |
227
+ | 15 | | | | | |
228
+ | 20 | | | | | |
229
+
230
+ **STAGE 1 GO/NO-GO DECISION at step 20:**
231
+ - Reward curve trending up: yes/no
232
+ - At least one reward > 0: yes/no
233
+ - Not stuck at single value: yes/no
234
+ - DECISION: PROCEED / STOP AND DEBUG
235
+ - Rationale:
236
+
237
+ #### Per-checkpoint evaluation (every 25 steps β€” MANDATORY)
238
+
239
+ For each checkpoint, run eval against E1/E2/E3 with 5 seeds, compare to untrained baseline.
240
+
241
+ ##### Checkpoint @ step 25
242
+ - HF Hub ID:
243
+ - Eval timestamp:
244
+ - E1 mean shaped: X (vs untrained: Y, delta: +Z)
245
+ - E2 mean shaped:
246
+ - E3 mean shaped:
247
+ - Overall mean:
248
+ - Binary rate: X%
249
+ - **Key behavioral change observed vs untrained:**
250
+ - Screenshot: `training_logs/run_1_checkpoint_25_rewardcurve.png`
251
+
252
+ ##### Checkpoint @ step 50
253
+ (Same structure)
254
+
255
+ ##### Checkpoint @ step 75
256
+ (Same structure)
257
+
258
+ ##### Checkpoint @ step 100 (FINAL)
259
+ - HF Hub ID:
260
+ - Eval timestamp:
261
+ - E1 mean shaped: X (vs untrained baseline: Y, delta: +Z, % improvement: W%)
262
+ - E2 mean shaped:
263
+ - E3 mean shaped:
264
+ - Overall mean:
265
+ - Binary rate: X%
266
+ - Compared to GPT-4o-mini: BEATS / TIES / LOSES
267
+ - Screenshot: `training_logs/run_1_final_rewardcurve.png`
268
+
269
+ #### Training run metadata
270
+
271
+ - **Start time:**
272
+ - **End time:**
273
+ - **Wall-clock duration:**
274
+ - **Total steps completed:** (if less than 100, note why)
275
+ - **First batch mean reward:**
276
+ - **Final batch mean reward:**
277
+ - **Delta first→final:**
278
+ - **% improvement first→final:**
279
+ - **Peak GPU memory during training:**
280
+ - **vLLM collocate stable throughout: yes/no**
281
+ - **HF checkpoint push count:** (should be 4: at 25, 50, 75, 100)
282
+
283
+ #### Errors encountered (full traceback for each)
284
+
285
+ If any:
286
+ 1. Step X β€” [error type] β€” paste full traceback
287
+ - Resolution: (what you did)
288
+ - Re-ran from: (checkpoint or from scratch)
289
+
290
+ If none: "No errors."
291
+
292
+ #### Iteration note
293
+
294
+ Is this Run 1 for this config, or did you re-run after fixing something?
295
+ - If re-run: what config change was made vs prior attempt? What did the prior attempt fail on?
296
+
297
+ #### Judgment calls made during this run
298
+
299
+ (E.g., "reduced max_completion_length from 1536 to 1024 because of OOM at step 40" β€” document any deviations from the planned config)
300
+
301
+ #### Verdict
302
+
303
+ - [ ] Stage 1 passes β€” pipeline validated, proceed to Stage 2 with Accounts 1 and 3
304
+ - [ ] Stage 1 fails β€” specific failure mode:
305
+ - Next action:
306
+
307
+ ---
308
+
309
+ ### Run 2 β€” Account 1 (Yashash) β€” STAGE 2 BINARY CONTROL β€” [Date Time start]
310
+
311
+ (Only start after Run 1 Stage 1 passes. Same structure as Run 1, but with:)
312
+
313
+ - **Reward variant:** `return reward.binary` (sparse 0/1 signal only)
314
+ - **Model:** Qwen 2.5 1.5B Instruct (same as Run 1)
315
+ - **Hypothesis:** Will sparse binary reward converge without dense shaping?
316
+
317
+ (Fill same template: config, pre-training check, per-batch log, per-checkpoint eval, metadata, errors, verdict.)
318
+
319
+ ---
320
+
321
+ ### Run 3 β€” Account 3 (Likith) β€” STAGE 2 CODER ABLATION β€” [Date Time start]
322
+
323
+ (Same structure, but:)
324
+
325
+ - **Reward variant:** `return reward.shaped_total` (same as Run 1)
326
+ - **Model:** Qwen 2.5 **Coder** 1.5B Instruct (`Qwen/Qwen2.5-Coder-1.5B-Instruct`)
327
+ - **Scenario set:** procedural (build_procedural_scenarios enabled)
328
+ - **Hypothesis:** Does code-pretraining help schema-adaptation learning?
329
+
330
+ (Fill same template.)
331
+
332
+ ---
333
+
334
+ ### Run N β€” [placeholder for additional iterations]
335
+
336
+ When you re-run any config with changes, create a new Run entry. Never edit Run 1-3. New runs get new numbers. This preserves the experimental history.
337
+
338
+ ---
339
+
340
+ ## 3. CHECKPOINT EVALS (all eval runs, any model)
341
+
342
+ Every eval.py invocation gets one entry here, even if it was just to sanity-check something.
343
+
344
+ ### Eval [N] β€” [model/checkpoint name] β€” [Date Time]
345
+
346
+ - **Target:** untrained base / checkpoint HF ID / baseline LLM name
347
+ - **Seeds:** 0, 1, 2, 3, 4
348
+ - **Scenarios:** E1, E2, E3
349
+ - **Full raw table:** (same format as baseline template above)
350
+ - **Aggregates:**
351
+ - E1 mean shaped:
352
+ - E2 mean shaped:
353
+ - E3 mean shaped:
354
+ - Overall:
355
+ - Binary rate:
356
+ - **3 failure examples (Action+Response JSON):**
357
+ - **Cost (if API-based):** $X.XX
358
+ - **Commentary:**
359
+
360
+ ---
361
+
362
+ ## 4. HEAD-TO-HEAD COMPARISONS (for blog, pitch, judges)
363
+
364
+ These tables get built progressively as runs complete. They ARE your pitch data.
365
+
366
+ ### Table A: Qwen 2.5 1.5B β€” untrained vs SchemaShift-trained (primary pitch number)
367
+
368
+ | Model state | E1 shaped | E2 shaped | E3 shaped | Overall | Binary rate |
369
+ |-------------|-----------|-----------|-----------|---------|-------------|
370
+ | Untrained base | | | | | |
371
+ | SchemaShift-trained | | | | | |
372
+ | **Improvement %** | | | | | |
373
+
374
+ ### Table B: Frontier models fail, trained small model succeeds (the headline claim)
375
+
376
+ | Model | Size | E1 | E2 | E3 | Avg |
377
+ |-------|------|-----|-----|-----|-----|
378
+ | naive_heuristic | β€” | | | | |
379
+ | policy_aware_heuristic | β€” | | | | |
380
+ | Qwen 2.5 7B Instruct | 7B | | | | |
381
+ | Llama 3.1 8B Instruct | 8B | | | | |
382
+ | GPT-4o-mini | ~8B* | | | | |
383
+ | **Qwen 2.5 1.5B + SchemaShift (ours)** | **1.5B** | | | | |
384
+
385
+ *GPT-4o-mini parameter count estimated β€” OpenAI has not disclosed publicly.
386
+
387
+ ### Table C: Reward function ablation (binary vs shaped)
388
+
389
+ | Run | Reward | Model | Final E1 | Convergence step | Verdict |
390
+ |-----|--------|-------|----------|------------------|---------|
391
+ | Run 1 (Account 2) | shaped_total | Qwen 1.5B | | | |
392
+ | Run 2 (Account 1) | binary only | Qwen 1.5B | | | |
393
+
394
+ Hypothesis being tested: dense shaping is necessary for GRPO convergence in sparse-reward tool-use domains.
395
+
396
+ ### Table D: Model ablation (Instruct vs Coder pretraining)
397
+
398
+ | Run | Model | Final E1 | Final E2 | Final E3 | Convergence step |
399
+ |-----|-------|----------|----------|----------|------------------|
400
+ | Run 1 (Account 2) | Qwen 2.5 1.5B Instruct | | | | |
401
+ | Run 3 (Account 3) | Qwen 2.5 Coder 1.5B Instruct | | | | |
402
+
403
+ Hypothesis: code-pretraining transfers to schema-adaptation.
404
+
405
+ ### Table E: Training efficiency
406
+
407
+ | Run | Steps | Wall-clock | GPU-hours | Cost (USD) | Peak reward |
408
+ |-----|-------|------------|-----------|------------|-------------|
409
+ | Run 1 | | | | (Kaggle free) | |
410
+ | Run 2 | | | | (Kaggle free) | |
411
+ | Run 3 | | | | (Kaggle free) | |
412
+
413
+ If Saturday onsite uses H100 credits, add row for that run and log cost.
414
+
415
+ ---
416
+
417
+ ## 5. ITERATION TIMELINE (what we tried, in order)
418
+
419
+ A chronological summary of every experiment. One line per iteration. This is the "we iterated" proof.
420
+
421
+ | # | Date/time | Run | Config change from previous | Outcome |
422
+ |---|-----------|-----|------------------------------|---------|
423
+ | 1 | | Run 1 (Stage 1) | First attempt β€” Qwen 1.5B + shaped | |
424
+ | 2 | | | | |
425
+ | 3 | | | | |
426
+
427
+ (Add rows as you go. Include failed runs β€” failures are data too.)
428
+
429
+ ---
430
+
431
+ ## 6. LESSONS LEARNED (captured while fresh)
432
+
433
+ Every time training surprises you β€” good or bad β€” note it here immediately. Do not defer. You will forget.
434
+
435
+ ### Lesson [N] β€” [short title] β€” [Date]
436
+
437
+ - Context:
438
+ - What happened:
439
+ - Why it happened:
440
+ - How to avoid / exploit it next time:
441
+
442
+ ---
443
+
444
+ ## 7. OPEN QUESTIONS FOR ONSITE
445
+
446
+ Things you couldn't resolve during dev that the onsite H100 run should answer.
447
+
448
+ 1.
449
+ 2.
450
+ 3.
451
+
452
+ ---
453
+
454
+ **This log is part of your submission evidence.** Judges may ask: "How many configurations did you try?" "What was your eval methodology?" "Show the reward improvement." Every good answer points back to a filled-in entry in this file.
training_logs/.gitkeep ADDED
File without changes