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 -
notebook: broaden Cell 10 SFT-only load except clause
User hit ImportError loading SFT-only adapter via FastLanguageModel.from_pretrained: cannot import name 'EmbeddingParallel' from transformers.integrations.tensor_parallel Root cause: peft (latest, pulled by uv) tries to use tensor-parallel sharding when torch.distributed.is_initialized() is True (Accelerate sets this up during training). The shard helper imports EmbeddingParallel which only exists in transformers >=4.57, but Unsloth pins us to transformers==4.56.2. Previous except clause caught only (RuntimeError, OOMError) — let ImportError bubble up and crash Cell 10. Broadened to Exception so any load failure (peft mismatch, adapter format, OOM) falls back gracefully to running eval with 4 policies instead of 5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c0ea16e -
notebook: fix GRPO prompts — apply chat template before passing to TRL
Symptom on user's run: GRPO step 2 showed reward=-0.5, reward_std=0, completions/clipped_ratio=1.0. Every K=4 rollout failed JSON parse in the same way, generating exactly max_completion_length=256 tokens without ever producing EOS. Cause: SFT trained with full ChatML wrapping (system+user+assistant turns delimited by im_start/im_end markers), but Cell 7 passed obs.prompt_text (raw env text) to TRL. TRL's GRPOTrainer treats the prompt column as raw text and feeds it straight to model.generate, with no chat template applied. The Qwen2.5-Instruct model saw out-of-distribution input and rambled until clipped. Fix: pre-render the chat template in build_grpo_prompts via tokenizer.apply_chat_template(..., add_generation_prompt=True). The prompt now ends with the assistant generation marker so the model knows to start its turn and produce JSON. Also inlined SFT_SYSTEM_PROMPT in Cell 7 (already inline in Cell 10) so the cell is self-contained after kernel restart. Co-Authored-By: Claude Op…215c8ad -
notebook: install openenv-core (and other repo deps) in Cell 0
Cell 7 hit ModuleNotFoundError 'openenv' because the repo's pyproject.toml deps (openenv-core, uvicorn, websockets, pyyaml, rich) were never installed. We use 'pip install --no-deps -e .' for the repo to preserve Unsloth's pins, but that means transitive deps don't get pulled. Solution: install the repo deps explicitly in Cell 0's uv install pass, so they're resolved together with Unsloth's stack. Cells 5-6 worked because they only touched torch/transformers/trl. Cell 7 was the first cell to import unified_incident_env.client which triggers 'from openenv.core ...'. Audited the full import chain — these 5 deps cover everything our notebook actually triggers. openenv-core also pulls fastapi/httpx/pydantic transitively (but we install those explicitly anyway). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>091927e -
notebook: switch Cell 0 to Unsloth's official uv pattern + harden Cells 10-12
Cell 0: replaced subprocess pip-install fallback with the exact uv install recipe that worked on the user's Space. Pins: - torch>=2.8.0, triton>=3.4.0 (Unsloth's tested CUDA stack) - transformers==4.56.2, trl==0.22.2, tokenizers (re-pinned via --no-deps) - unsloth + unsloth_zoo from git+https (latest patches) - extras (vllm, datasets, accelerate, matplotlib, pandas, httpx, fastapi, pydantic) resolved together so vllm doesn't pull a different transformers - repo installed via `pip install --no-deps -e .` to preserve Unsloth's pins Idempotent: skips entirely if all deps are present (~3s on kernel restart). Cell 1: removed misleading torch downgrade FIX (would break Unsloth's pins). New FIX directs to Space hardware reset. Cell 5 markdown: corrected to LoRA r=32 (was r=64). Cell 10: hardened against missing artifacts: - SFT_SYSTEM_PROMPT inlined (cell self-contained after kernel restart) - SFT-only second-model load wrapped in try/except (handles OOM gracefully) - G…b2632ec -
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
-
notebook: use Qwen2.5-3B-Instruct (has chat template) not the base model
The base model unsloth/Qwen2.5-3B-bnb-4bit has no chat_template set, so tokenizer.apply_chat_template() raises ValueError. The Instruct variant has ChatML pre-configured and is also a stronger SFT starting point (already outputs JSON, follows prompts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>2214e76 -
notebook: align with Unsloth-recommended TRL 0.22.2
Unsloth's reference install pins trl==0.22.2, which has a slightly different GRPO API than TRL 1.x: - TRL 0.22.2: max_prompt_length exists, vllm_max_model_length doesn't - TRL 1.x: vllm_max_model_length exists, max_prompt_length removed Switch GRPOConfig to use max_prompt_length=2048 (works with 0.22.2). SFTConfig was already API-compatible with both. Also drop trl version pin from Cell 0 fallback install so it doesn't fight Unsloth's pinning if the user pre-installed via Unsloth's pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>65d2643 -
notebook: show pip install progress (drop -q flag)
The -q flag hid 8-15min of legitimate progress, making the cell look hung. Print clear time estimate + how to verify pip is still working. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>93e560c -
notebook: rewrite for robustness and resumability
- Cell 0 idempotent: detects cwd / clone state / install state, ~5s on rerun - Every cell self-imports — survives kernel restart without re-running Cell 0 - nvidia-smi GPU check before torch import — clearer error if no GPU - Cell 1: actionable PyTorch CUDA-mismatch FIX message with exact pip commands - Cell 6: skip SFT if outputs/sft_final/ already exists (resume after restart) - Cell 9: skip GRPO if outputs/grpo_final/ exists; auto-fallback to no-vLLM if vLLM crashes (common on some Spaces) - Cell 10: skip eval if comparison_raw.csv already exists After any kernel restart: just re-run Cell 0 (5s) + the cell you want to continue from. No more NameError / re-cloning / re-installing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>17dba36 -
notebook: fix TRL >=1.0 API breakage
- SFTConfig: max_seq_length -> max_length - SFTTrainer: tokenizer -> processing_class - GRPOConfig: drop max_prompt_length (removed), add vllm_max_model_length=4096 - GRPOTrainer: tokenizer -> processing_class - Pin trl>=1.0,<2.0 in install command Without these, Cell 6 (SFT) and Cell 9 (GRPO) crash on instantiation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>32e423b -
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 -
Tier-escalating sre-gym v3.0 — compute → horizon → realism
Three-tier reframe of the env around the dimensional-escalation insight: each tier escalates a different bottleneck, not just scenario count. Basic (runnable): - 12 templates × 5 procgen variants = 72 deterministic scenarios - 6 v2 templates retained verbatim - 6 round-2 templates added (dep_degradation, memory_leak_oom, auth_token_expiry, network_partition, rate_limit_retry_storm, migration_lock) — each grounded in a 2025–26 production postmortem - Hardened scripted-optimal ceiling kept ≤ 0.80 across all 12 - 26 new template tests + 12 wrapper tests = 38 added (74 total green) Advanced (design): - 3 reference scenarios shipped as YAML (cascading_release_train / observability_pipeline_outage / supabase_rls_silent_leak) with topology, multi-phase incident chain, expanded action set, reward dimensions, reference traces, and synthetic on-call peer behaviour Max (design): - One fully-specced family (ecommerce_vibecoded_saas) with 22-service docker-compose stack, 1…2733f3f