Spaces:
Running
Running
Commit History
-
finalization: blog + README + execution rewrite, drop 3B + openclaw shim
- Add BLOG.md at repo root with 6 blog assets in docs/blog/. Trimmed to ~1.5k words, opens with "why this matters", embeds an agent transcript, drops the dashed-pending rectangle for the real eval table, ends on a claim instead of "watch this space". - Rewrite README around env -> reward -> coliseum -> training (honest weak point) arc, with the new tier names (Triage/Strategy/Operations) and the Madhav-GPT/sre-env GitHub URL. Adds the world-modelling framing to the reward section. - Rewrite execution.md as a leaner operator runbook. Reflects the actual current state (training executed, results landed) instead of the old "to be executed externally" framing. Drops openclaw_integration mentions. - Delete openclaw_integration/ shim entirely (rename to coliseum/ already shipped). Drop the legacy 3B Qwen2.5 notebook (01_triage_train_grpo.ipynb + .py) and the old basic/advanced/max-named variants (01_basic_train_grpo_unsloth, 02_basic_eval_comparison, 03_advanced_bluep…0058c94 -
training: precision rewrite to prevent SFT collapse + GRPO variance starvation
Root cause of prior collapse: 30 expert episodes had only 6 unique action sequences, and 3 epochs at lr=1e-4 over 900 examples drove perplexity below 1.1 (full memorization). GRPO then had zero rollout variance. Data fixes — diversity: - run_expert_collection.py: 4 distinct evidence-gathering plans per template, varying query order/types/hypothesis confidence. Now covers all 12 templates (was 6) → 12 × 4 plans × 5 procgen = 240 expert episodes. - build_corpus.py: stratified sampling so each template gets ≥6 expert (was imbalanced 0-22). Final corpus: 999 trajectory steps with 89% unique (prompt, response) pairs, up from 6 unique sequences total. SFT fixes — anti-overfit: - max_steps 150 → 50 (~0.8 epoch over the 999-step corpus, vs 3 epochs) - learning_rate 1e-4 → 5e-5 - LoRA r 64→32, alpha 128→64, dropout 0.0→0.1 - warmup_ratio 0.05 → 0.10 - eval_steps 25 → 10 (catch overfit early) - load_best_model_at_end + metric_for_best_model="eval_loss" (auto-recover) - assistant_only_l…42ab8f0
-
hackathon sprint: grader collapse + coliseum rename + training pipeline
- 5-component grader (outcome 0.45 + valid 0.20 + format 0.10 + anti 0.15 + eff 0.10) - openclaw_integration renamed to coliseum (ArenaClient/ArenaPool, COLISEUM_* env) - sre_gym tier renames: basic→triage, advanced→strategy, max→operations - README rewrite with Triage/Strategy/Operations vocabulary - training pipeline: build_corpus.py + run_expert_collection.py + 01_triage_train_grpo notebook - 30 expert trajectories for the 6 missing templates (sonnet_missing6.jsonl) - 120-episode SFT corpus at 60/20/20 expert/mediocre/failure split - notebook bootstrap clones from Madhav-GPT/sre-env Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c9baa73 -
data: 30 expert episodes + training notebook
f337985 -
GRPO notebook: trajectory snapshots, Drive checkpointing, comparison table
Adopted the advisor's "training logs that win the pitch" recommendations: 1. **Trajectory snapshots** at steps [0, 50, 100, 150, 200, 250]. Each snapshot saves the best- and worst-scoring rollout from that step's K=4 group as JSON (full prompt/response/reward per turn). This is the "step 0 vs step 250" before/after demo material. 2. **Drive checkpointing** at every SAVE_EVERY (25) steps. Mounts /content/drive on first cell-7 run; saves adapter to /content/drive/MyDrive/sre-gym-grpo/step{N}/ in addition to the HF Hub push. Defense-in-depth: a 6-hour Colab disconnect won't lose the model now. 3. **Per-scenario rolling means** logged to wandb as per_scenario_mean/<scenario_id> — lets you see if the model is learning the easy ones first or generalizing across all 6 templates. 4. **Action distribution** counter over the whole run. Logged at end to wandb. Tells you if the policy is collapsing to a single action or learning real strategy. 5. **Baseline re…7b4e2df -
Replace estimated baseline numbers with eval_sweep-verified ones
Ran train/eval_sweep.py against the local env for random + heuristic policies (3 episodes per scenario × 6 base scenarios × 2 policies = 36 episodes total). Real measurements: Heuristic (deterministic, no LLM): 18 eps, 0/18 resolved, mean 0.187 Random (uniform over allowed): 12 eps, 0/12 resolved, mean 0.345 Notable: heuristic UNDERPERFORMS random because the deterministic policy never picks rollback_deploy (always falls into query_logs loops). This makes heuristic the tighter capability floor — a trained model needs to clear 0.19 to demonstrate it learned anything. The README baseline table now cites eval_sweep_baselines.jsonl as provenance for these two rows. Llama / Claude rows still come from their respective collection JSONLs (also in train/data/). Spread is 0.58 (0.19 -> 0.77) — solidly in the band where GRPO can produce a measurable training curve. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c8cdf7c -
Auto-fetch seed dataset + Open-in-Colab badges
Cell 10 of sanity_run.ipynb now urlretrieves seed_combined.jsonl from the public GitHub raw URL on first run — no manual file upload needed. Both notebooks have an "Open in Colab" badge at the top so a single click on the GitHub README lands directly in a runnable Colab session. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>0ef5181 -
Wire Colab Secrets bridge into both training notebooks
Colab stores secrets in google.colab.userdata (the 🔑 panel), not os.environ — the notebooks were silently failing on push_to_hub. Cell 6 (sanity_run) and cell 7 (grpo_run) now: 1. Pull HFTOKEN / HF_TOKEN / HUGGINGFACE_TOKEN from userdata 2. Pull WANDB_API_KEY (or wandb / WANDB) from userdata 3. Set them as os.environ so transformers + wandb see them 4. Hard-fail with a clear message if HF_TOKEN is still missing 5. Auto-toggle WANDB_MODE between online/offline based on key presence Also wired the SFT trainer with push_to_hub=True and hub_strategy='every_save' so checkpoints survive Colab disconnects, pushing to dakshdoesdev/sre-gym-qwen35-4b-sft. GRPO destination is dakshdoesdev/sre-gym-qwen35-4b-grpo (matched to the SFT base model decision; was a placeholder qwen7b-* before). Updated outdated copy in cells 0/9/11 of sanity_run from the '39 samples / 2 teachers' draft to the current '200 samples / 3 teachers'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>bcfbf5f
-
Expand seed_combined.jsonl to 200 samples across 3 teachers
21 episodes / 204 raw steps / 200 trainable samples. Three-teacher mix with deliberate score variance: - Claude Opus 4.7 (expert, hand-driven): 6 eps, mean 0.769, 6/6 resolved - Llama-3.3-70B via Fireworks (solid): 4 eps, mean 0.725, 3/4 resolved - Llama-3.3-70B via Groq (noisy realistic):11 eps, mean 0.421, 5/11 resolved The 0.42 Groq mean is not a bug — those episodes show the model looping on query/hypothesis without committing to rollback, which is the exact failure mode GRPO needs to learn to correct. GRPO advantage estimation requires samples across the reward distribution; a corpus of only expert demos would flatten to zero advantages. All 6 scenario templates now have teacher coverage (schema_drift was previously missing — one Groq episode fills that gap). Known gotchas documented in train/data/README.md: Fireworks daily quota, Groq TPM cap, 50-char prompt filter for 4 rollback steps with empty priors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.c…7ee873a -
Add Groq driver, GRPO notebook, and eval-sweep harness
collect_trajectories.py: generalize the OpenAI-compatible driver so the same code path serves both Fireworks and Groq. Adds --driver groq with GROQ_API_KEY / GROQ_BASE_URL plumbing. Verified against llama-3.3-70b-versatile on Groq free tier (no 429s at parallelism=3). grpo_run.ipynb: NEW Colab-ready notebook. Boots the OpenClaw pool server locally, loads the SFT LoRA from dakshdoesdev/sre-gym-qwen7b-sft, runs 300 GRPO steps with K=4 rollouts per step, reward = env.evaluate()['score'], pushes to dakshdoesdev/sre-gym-qwen7b-grpo every 25 steps. Simple policy gradient (no PPO-clip yet; documented as v2 in the notebook's Caveats). eval_sweep.py: NEW harness for the comparison table. Runs N episodes per scenario per policy against a live env, writes JSONL + summary. Supports random / heuristic / groq / fireworks policies; SFT-adapter support is stubbed for when the trained checkpoint lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>0d3e723 -
Add Llama-3.3-70B teacher episodes + merge into seed_combined.jsonl
Generated 4 episodes of Llama-3.3-70B teacher trajectories via Fireworks inference API before hitting the free-tier daily rate cap. 3/4 resolved, mean score 0.725 — noisier than Claude Opus's 0.769 expert demos, which is useful variance for downstream GRPO. seed_combined.jsonl is now the canonical training input: - 10 episodes, 82 raw steps, 78 trainable after filter - 2 teachers (Claude Opus expert + Llama-3.3-70B realistic) - 5 of 6 scenario templates covered (schema_drift_missing_migration still needs teacher data once Fireworks quota resets) Point sanity_run.ipynb (cell 6 + cell 9 text) at seed_combined.jsonl instead of claude_seed.jsonl. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>9c00699 -
Add Fireworks driver for teacher-data collection
collect_trajectories.py now supports --driver fireworks alongside the existing --driver anthropic and --driver heuristic. Uses Fireworks' OpenAI-compatible /chat/completions endpoint via httpx. Includes explicit 429 Retry-After handling with jittered exponential backoff, since the free tier rate-limits aggressively and unhandled 429s cascade to the heuristic fallback — which silently poisons the dataset with wrong-target rollbacks on noise services. Also gitignores .env (stores FIREWORKS_API_KEY locally). Verified against accounts/fireworks/models/llama-v3p3-70b-instruct: 4/4 clean episodes at parallelism=2 on a smoke test, mean score 0.725, below the scripted baseline ceiling (0.80) and well above heuristic floor (0.15) — the headroom band we need for training signal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>4d6c819 -
Document the 4-step empty-prompt filter in seed README
35 of 39 steps are trainable; 4 rollback steps have empty prompts due to a chained-call logging bug in the driver script. Loaders should filter `len(prompt) < 50` — reference implementation in sanity_run.ipynb cell 10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>8dfbdb7 -
Rewire sanity_run.ipynb to SFT on the 39-sample Claude seed
Was: 10 hand-crafted toy examples, 200 steps, dependency smoke-test only. Now: loads train/data/claude_seed.jsonl (35 usable samples after filtering 4 rollback steps with lost priors from a chained-call logging bug), 500 SFT steps (~13 epochs), tightened system prompt, inference cell parses output and reports action_type format compliance. Purpose: this LoRA adapter becomes the GRPO starting point. Expected wall-clock on A100 40GB: ~20 minutes. Upload claude_seed.jsonl to /content/claude_seed.jsonl before running. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>0e63c79 -
Add vibe-coded SaaS scenarios + Claude-teacher seed dataset
Three new scenario templates grounded in 2025-2026 production incidents (Replit/SaaStr, Base44, Tea app; Veracode/JFrog/Accorian research showing 45% of AI-generated code has security flaws, 88% of AI-generated logging is unsafe, 40% of AI-generated DB queries are SQL-injectable): - payment_webhook_misconfig (medium): Stripe signature-verification regression from a bad api-gateway deploy. Noise decoy is stripe-webhook itself, which is a downstream symptom. - schema_drift_missing_migration (medium): Prisma/Supabase schema drift where an api-gateway deploy expects a column whose migration never shipped. Worker-shared Prisma client also fails, making scope look DB-side. - cache_stale_state (medium): cache TTL regression (30s -> 3600s) serves stale and cross-user state. Misleading "high hit ratio" signal is the trap. First scenario exercising rollback=cache + restart=cache pattern. Each expands to 5 procgen variants. Total live scenarios: 30 (was 15). Also adds a Claude-teac…f749d7b
-
Harden env + ship Claude skill, OpenClaw-RL shim, training pipeline
Env hardening (Stream 1): - Rebalance grader into 7 dimensions with speed_bonus + noise_handling_score so scripted baseline ceiling drops 0.99 -> 0.74, creating training headroom - Surface noise_alerts, blast_radius, noise_queries on observation + state - Extend ServiceName literal with the noise-service pool Procedural scenarios: - Each of the 3 hand-crafted templates spawns 4 jittered variants via seeded RNG: metric noise, deploy timing, rotated noise-service selection - 15 scenarios total (5 per difficulty), baseline-resolvable via template_id dispatch in _baseline_actions OpenClaw-RL integration shim: - openclaw_integration/pool_server.py: FastAPI lease-based session server, asyncio-locked per-lease, TTL reaper for idle cleanup - openclaw_integration/sre_env_client.py: drop-in shape match with terminal-rl/env_client.py - README documents the one-line import patch for terminal-rl/generate.py Claude Code skill (v0 pitch): - skill/SKILL.md with investigation methodology +…0bf41ea