[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-sop-ft-orchestrate":3,"mdc--ritoxx-key":34,"related-org-nvidia-sop-ft-orchestrate":10342,"related-repo-nvidia-sop-ft-orchestrate":10497},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"sop-ft-orchestrate","orchestrate SOP fine-tuning pipelines","Autonomous end-to-end orchestrator for SOP fine-tuning. Runs the full Import → Augment → DDM Train → VLM Train → Evaluate → RCA loop. Interprets RCA findings across DDM, VLM and augment axes, applies config fixes autonomously, and iterates until success criteria are met or max_pipeline_iterations reached. Call with a path to an inputs.yaml or with natural language.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Automation","automation","tag",{"name":17,"slug":18,"type":15},"Machine Learning","machine-learning",{"name":20,"slug":21,"type":15},"Orchestration","orchestration",{"name":9,"slug":8,"type":15},39,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fsop-monitoring-blueprints","2026-07-14T05:36:28.162686","CC-BY-4.0 AND Apache-2.0",12,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"Industrial SOP Monitoring Blueprints for Training & Inference","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fsop-monitoring-blueprints\u002Ftree\u002FHEAD\u002Fagentic\u002Fsop-agentic-ft\u002Fplugins\u002Fsop-ft-orchestrate-plugin\u002Fskills\u002Fsop-ft-orchestrate","---\nname: sop-ft-orchestrate\ndescription: Autonomous end-to-end orchestrator for SOP fine-tuning. Runs the full Import → Augment → DDM Train → VLM Train → Evaluate → RCA loop. Interprets RCA findings across DDM, VLM and augment axes, applies config fixes autonomously, and iterates until success criteria are met or max_pipeline_iterations reached. Call with a path to an inputs.yaml or with natural language.\nargument-hint: \u003Cinputs.yaml> | \"fine-tune on \u002Fpath\u002Fto\u002Fdataset targeting seq_accuracy >= 0.70\"\nlicense: \"CC-BY-4.0 AND Apache-2.0\"\n---\n\n# SOP Fine-tuning Orchestrator\n\n## Prime Directive: Never Stop Until the Goal Is Reached\n\n>IMPORTANT: **Never stop unless iterations_substantive >= budget.max_pipeline_iterations, accuracy criteria met, the failure requires locked external systems, or hardware changes.**\n\nThis means:\n\n- Phase fail → diagnose, fix, restart. Do not report and wait.\n- `\u002Fsop-rca` delegation FAILED (skill missing or errored) → use the fallback diagnostics in Step 8b for that one iteration; document the failure in `run_state.yaml`; retry `\u002Fsop-rca` next iteration.\n- max_pipeline_iterations reached → write PARTIAL report (Step 9) with remaining gaps and recommended fixes.\n- Hang\u002Fcrash → watchdog diagnoses and restarts autonomously, including code-level fixes. **All code fixes follow Override Policy — never modify `plugins\u002F`.**\n\n### Iteration Budget — ENFORCED\n\nThe budget is `max_pipeline_iterations` (default **8**, set in `inputs.yaml`). Track it explicitly under `run_state.yaml`:\n\n```yaml\niteration_budget:\n  max_pipeline_iterations: 8        # from inputs.yaml\n  iterations_substantive: 0         # cumulative count of retraining iters (categories below)\n  iterations_eval_only: 0           # threshold sweeps, etc — DO NOT count against budget\n  iterations_remaining: 8           # = max - substantive\n  rca_runs_completed: 0             # invariant: must equal count(eval_history entries that miss success_criteria) when run_rca: true\n  attempts:                         # one entry per substantive iter — for the pre-PARTIAL gate\n    augment_config_change: []       # list of distinct configs tried (e.g., [\"DMCQ confusion\", \"DMCQ adjacent\"])\n    training_config_change: []      # e.g., [\"LR corrected to 5e-6\"]\n    ddm_training_config_change: []  # e.g., [\"epochs 30\", \"epochs 30 + RandomResize bilinear\"]\n    code_change: []                 # infra fixes — free, do not count against budget\n```\n\n**Iteration types — only \"substantive\" counts against the budget:**\n\n| Type | Budget Counts? | Example |\n|------|---------|---------|\n| `substantive` | ✅ counts | augment-config-change, training-config-change, ddm-training-config-change |\n| `eval-only` | ❌ not counts | DDM threshold sweep with same VLM checkpoint, eval-config-change with same model |\n| `infrastructure` | ❌ not counts | code-change for an auto-fixable bug, container restart |\n\nOnly substantive counter matters — 2 retrains + 3 threshold sweeps = **2\u002F8** budget used. Update `iteration_budget` after EVERY iteration.\n\n(Diagnostic heuristics for the rare case where `\u002Fsop-rca` is **unavailable** have moved to **Step 8b-fallback**. Do not consult them as a routine substitute for RCA)\n\n## Watchdog Policy\n\nAfter every job launch: run with `run_in_background=true`; do not poll or sleep.\n\n| Phase | Mechanism | Terminal signals \u002F outputs |\n|-------|-----------|---------------------------|\n| DDM train | `watch_api_job.sh` watchdog | `DDM_DONE`, `DDM_FAILED`, `DDM_HANG` (in `watchdog_ddm.log`) |\n| VLM train | `watch_api_job.sh` watchdog | `VLM_DONE`, `VLM_FAILED`, `VLM_HANG`, `VLM_TIMEOUT` (in `watchdog_vlm.log`) |\n| By-action eval | `\u002Fsop-by-action-eval` skill (blocks on API poll) | JSON envelope on stdout — `status: completed \\| failed \\| timeout` |\n| E2E eval | `\u002Fsop-e2e-inference` skill (blocks on API poll) | JSON envelope on stdout — `status: completed \\| failed \\| timeout` |\n\nTraining watchdogs remain file-based. Eval uses the blocking skill envelope (Step 7a\u002F7b) — no watchdog log to monitor; the skill returns when eval-ms reports a terminal status.\n\nIf Monitor silent >10 min (training): check watchdog process alive; restart if dead.\n\n---\n\n## Override Policy: Never Modify Plugin Files During a Run\n\n**Files inside `plugins\u002F` are read-only.** Copy any file needing changes to `\u003Crun_dir>\u002Foverrides\u002F` first, then modify the copy. Pass the override via env vars\n\nRecord in `run_state.yaml` under `overrides:`. Never use `plugins\u002F` paths.\n\n---\n\n## Pipeline Overview\n\nDDM and VLM are **independent retry axes** — each can be retrained without touching the other.\nThe table shows which steps run for each action type:\n\n| Action type | Step 4 Augment | Step 5 DDM | Step 6 VLM | Step 7 Eval |\n|---|---|---|---|---|\n| eval-config-change | ❌ | ❌ | ❌ | E2E only |\n| DDM training-config-change | ❌ | ✅ retrain | ❌ | E2E only |\n| VLM training-config-change | ❌ | ❌ | ✅ retrain | Both |\n| augment-config-change | ✅ re-augment | ❌ | ✅ retrain | Both |\n| code-change | depends on phase | depends | depends | depends |\n\n```\n[Step 1] Prerequisites\n      │\n      ▼\n[Step 2] Initialize run_state.yaml\n      │\n      ▼\n[Step 3] Import dataset ── run ONCE, never repeated\n      │\n      ▼\n[Step 4] Data Augmentation  ◄── augment-config-change (DMCQ, confusion_map, MCQ max_chunk_len)\n         BCQ · MCQ · GoldenGQA · GQAs · DMCQ · DS            [DDM unaffected — skip Step 5]\n      │\n      ▼\n[Step 5] DDM-Net Training  ◄── DDM training-config-change (resolution, RandomResize, epochs)\n         ResNet-50 boundary detector                         [skip Step 4 + Step 6]\n      │\n      ▼\n[Step 6] VLM Training  ◄────── VLM training-config-change (LR, fps\u002Fmax_frames)\n         Cosmos-Reason2-2B SFT + LoRA merge if applicable   [skip Step 4 + Step 5]\n      │\n      ▼\n[Step 7] Evaluate\n      ├── 7a By-Action  (VLM in isolation, perfect segmentation)\n      └── 7b E2E        (DDM + VLM full pipeline)\n            │  [DDM-only retrain → Step 7b only; VLM or augment → both 7a + 7b]\n      ▼\n[Step 8] RCA + Decision Loop\n      │\n      ├── ALL criteria met ─────────────────────────────────► DONE ✅\n      │\n      ├── eval-config-change ──────────────────────────────► Step 7 → Step 8\n      │\n      ├── DDM training-config-change ─────────────────────► Step 5 → Step 7b → Step 8\n      │   resolution · RandomResize · epochs                 (augment + VLM unchanged)\n      │\n      ├── VLM training-config-change ─────────────────────► Step 6 → Step 7 → Step 8\n      │   LR · fps\u002Fmax_frames mismatch                       (augment + DDM unchanged)\n      │\n      ├── augment-config-change ───────────────────────────► Step 4 → Step 6 → Step 7 → Step 8\n      │   DMCQ · confusion_map · MCQ max_chunk_len           (DDM unchanged — skip Step 5)\n      │\n      ├── code-change ──────────────────────────────────────► override fix → retry phase\n      │\n      └── max iterations or manual ──────────────────────────► Step 9 PARTIAL + hand off\n```\n\n---\n\n## Reference Documents\n\n- `${SKILL_DIR}\u002Freferences\u002Finputs-template.yaml` — all config fields\n- `${SKILL_DIR}\u002Freferences\u002Fdecision-logic.md` — RCA action type → pipeline response mapping\n- `${SKILL_DIR}\u002Freferences\u002Fprerequisites.md` — pre-flight checklist\n- `${SKILL_DIR}\u002Freferences\u002Frun-state-schema.yaml` — full run_state.yaml template with field annotations\n- `${SKILL_DIR}\u002Freferences\u002Fgqas-preflight.md` — local vLLM launch, probe-validate, and output check (Steps 1–3)\n- `${SKILL_DIR}\u002Freferences\u002Fclaude-gqas-setup.md` — Claude API backend setup: patch, restart, verify\n- `${SKILL_DIR}\u002Fscripts\u002Fwatch_api_job.sh` — watchdog for API-polled jobs (DDM, VLM training)\n- Eval jobs (`\u002Fsop-by-action-eval`, `\u002Fsop-e2e-inference`) are NOT watchdogged — the eval skills block until the eval-ms HTTP job reaches a terminal state and return a JSON envelope.\n- `${SKILL_DIR}\u002Fscripts\u002Fauto_detect_splits.py` — auto-detect train\u002Ftest split subdirectories\n- `${SKILL_DIR}\u002Fscripts\u002Fimport_dataset.sh` - import annotated dataset\n- `${SKILL_DIR}\u002Freferences\u002Faugment-config-guide.md` — annotated augment_config.yaml template (DMCQ, MCQ, GQAs)\n\n---\n\n## Resume Protocol\n\n**Run at the very start of every session:**\n\n```bash\nls \u003Coutput_dir>\u002Frun_*\u002Frun_state.yaml 2>\u002Fdev\u002Fnull | sort | tail -1\n```\n\nIf a `run_state.yaml` is found:\n\n1. Print full contents with `=== RESUMING RUN: \u003Crun_id> ===`\n2. `done` → skip. `in_progress` → verify: DDM\u002FVLM: check API status; eval: check output file exists; augment: check augmented dir exists.\n3. Continue from first non-`done` phase.\n\nIf no `run_state.yaml` exists — proceed to Step 0.\n\n---\n\n## Step 0: Parse Inputs\n\nRead the inputs.yaml (or parse natural language). Resolve all paths. Set defaults. Print config summary and confirm with user before starting:\n\n### Output Directory Contract (mandatory)\n\nThere are **two trees** in an orchestrated run, owned by different things:\n\n1. `\u003Crun_dir>\u002F` — owned by the orchestrator. Contains run-state, per-iter configs, RCA reports, progress, watchdogs, and a per-iter snapshot of each eval job's output.\n2. `\u003Chost_results_root>\u002F\u003Ceval_job_id>\u002F` — owned by **eval-ms**. Each `\u002Fsop-by-action-eval` and `\u002Fsop-e2e-inference` invocation produces one such directory; eval-ms decides the uuid. The orchestrator never *writes* here, but it does two things after each eval: (a) records pointers in `run_state.eval_outputs`, **and** (b) snapshots the job's output into `\u003Crun_dir>\u002Fiter\u003CN>\u002F{by_action,e2e}\u002F` so the run dir is self-contained and survives any later cleanup of the eval-ms store.\n\n```\n\u003Coutput_dir>\u002F                              # from inputs.yaml; default .\u002Fsop_fine_tune\n└── run_\u003CYYYYMMDD_HHMMSS>\u002F                 # = \u003Crun_dir>; created in Step 2\n    ├── run_state.yaml                     # full run state — incl. eval_outputs pointers (KEPT)\n    ├── progress.md, progress.html         # phase logs + live progress chart\n    ├── orchestrator_report.md             # final SUCCESS \u002F PARTIAL summary\n    ├── overrides\u002F                         # code overrides per Override Policy\n    ├── watchdog_*.log                     # DDM\u002FVLM training watchdog tails\n    └── iter\u003CN>\u002F\n        ├── augment_config.yaml            # snapshot of augment config used\n        ├── ddm_train_config.yaml          # snapshot of DDM training config\n        ├── train_config.toml              # snapshot of VLM training config\n        ├── training.log                   # copy of VLM training log\n        ├── inputs_by_action_iter\u003CN>.yaml  # generated per-iter eval input (moved here, off top level)\n        ├── inputs_e2e_iter\u003CN>.yaml        # generated per-iter eval input\n        ├── by_action\u002F                     # snapshot of the by-action eval job output\n        ├── e2e\u002F                           # snapshot of the e2e eval job output\n        ├── rca_analysis\u002F                  # \u002Fsop-rca helper JSONs\n        └── rca_report.md                  # \u002Fsop-rca formal report (REQUIRED on failure)\n```\n\n```\n\u003Chost_results_root>\u002F                       # docker-compose volume\n├── \u003Cby_action_eval_job_id>\u002F               # \u002Fsop-by-action-eval job output\n│   ├── inference_results.json\n│   ├── log.txt\n│   └── assets\u002F\n└── \u003Ce2e_eval_job_id>\u002F                     # \u002Fsop-e2e-inference job output\n    ├── e2e_results.json\n    ├── log.txt\n    ├── sop_e2e_eval_log.txt\n    ├── outputs_action_recognition\u002F\n    │   ├── accuracy.json\n    │   ├── video_name_to_output_text.json\n    │   └── action_recognition_multi_gpu.log\n    └── outputs_temporal_segmentation\u002F\n        ├── f1_\u003Cthr>.json\n        ├── video_to_boundaries_debug.json\n        ├── video_to_ddm_info_debug.json\n        ├── temporal_segmentation.log\n        └── \u003Cvideo>.png\n```\n\n**Hard rules:**\n\n- The orchestrator MUST pass `output_dir=\u003Crun_dir>\u002Fiter\u003CN>` when delegating to `\u002Fsop-rca` in Step 8b (see \"RCA delegation contract\" below). Never let `\u002Fsop-rca` default to `\u003Ccwd>\u002Frca_reports\u002F` — that splits artifacts.\n- The orchestrator MUST NOT pass `output_dir` to `\u002Fsop-by-action-eval` or `\u002Fsop-e2e-inference`. Those skills do not accept an output-dir override — eval-ms decides where the job writes. The orchestrator captures the returned `host_output_dir` from each skill's JSON envelope and (a) persists it to `run_state.eval_outputs.\u003Cphase>.host_output_dir`, then (b) snapshots that directory into `\u003Crun_dir>\u002Fiter\u003CN>\u002F\u003Cphase>\u002F` (Step 7c).\n- The eval snapshot is a full recursive copy of the eval-ms job dir (e.g. `cp -a \u003Chost_output_dir>\u002F. \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002F`). Copy everything the job wrote; do not hand-pick files.\n- All ad-hoc analyses produced by the orchestrator (helper-script outputs, debug dumps, scratch yamls) MUST live under `\u003Crun_dir>\u002F` — never under `\u003Ccwd>\u002F` and never under any plugin path.\n- One run = one `\u003Crun_dir>`. Resumes write into the same `\u003Crun_dir>` discovered by the Resume Protocol.\n- Eval-ms-owned directories under `\u003Chost_results_root>\u002F` are not garbage-collected by the orchestrator.\n\n### RCA delegation contract (Step 8b call site)\n\n`\u002Fsop-rca` reads paths it was told about — it does NOT construct paths from conventions. The orchestrator builds the delegation payload from `run_state.eval_outputs` (populated by Step 7a\u002F7b) plus the snapshots it placed under `\u003Crun_dir>\u002Fiter\u003CN>\u002F`:\n\n```\n\u002Fsop-rca \\\n  e2e_outputs_dir=\u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_action_recognition \\\n  ddm_outputs_dir=\u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_temporal_segmentation \\\n  by_action_results=\u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002Finference_results.json \\   # JSON is preferred; log.txt also accepted\n  actions_json=\u003Cdataset_path>\u002Factions.json \\\n  augment_config=\u003Crun_dir>\u002Fiter\u003CN>\u002Faugment_config.yaml \\\n  ddm_train_config=\u003Crun_dir>\u002Fiter\u003CN>\u002Fddm_train_config.yaml \\\n  vlm_train_config=\u003Crun_dir>\u002Fiter\u003CN>\u002Ftrain_config.toml \\\n  vlm_train_log=\u003Crun_dir>\u002Fiter\u003CN>\u002Ftraining.log \\\n  output_dir=\u003Crun_dir>\u002Fiter\u003CN> \\\n  iter=\u003CN> \\\n  success_criteria=\"e2e_seq_acc>=1.0,e2e_action_acc>=0.95,by_action_acc>=0.95,ddm_f1>=0.6\"\n```\n\n**Dispatch this payload via a sub-agent** (Agent tool) — see Step 8b for why this is mandatory (keeps the heavy RCA out of the orchestrator's context so RCA is always affordable). The sub-agent writes analysis JSONs to `\u003Coutput_dir>\u002Frca_analysis\u002F` and the report to `\u003Coutput_dir>\u002Frca_report.md`, and returns ONLY the compact `RCA_RESULT:` block (its skill's return contract). The orchestrator consumes that block — verifying `RCA_RESULT.report_path` exists and copying `RCA_RESULT.typed_actions` into `rca_reports[]` — and never needs to load the report prose.\n\n\n### Dataset Split Auto-Detection\n\nIf the user provides a single `dataset_path` (no explicit `eval_dataset_path`), run:\n\n```bash\npython3 ${SKILL_DIR}\u002Fscripts\u002Fauto_detect_splits.py \u003Cdataset_path>\n# Success: prints TRAIN=\u003Cabs_path> and EVAL=\u003Cabs_path>\n# Failure: prints diagnostic and exits 1 — set paths explicitly in inputs.yaml\n```\n\nMatches `\u003Cstem>_train` ↔ `\u003Cstem>_test` pairs; fails on zero or ambiguous matches.\n\n---\n\n## Step 1: Prerequisites\n\nRun all checks from `references\u002Fprerequisites.md`. Auto-fix soft issues (start services, install packages). Block on hard failures. Do not proceed until all pass.\n\n---\n\n## Step 2: Initialize Run State\n\nCreate `\u003Coutput_dir>\u002Frun_\u003CYYYYMMDD_HHMMSS>\u002Frun_state.yaml`. Print path as first output line: `=== RUN STATE: \u003Cfull\u002Fpath\u002Fto\u002Frun_state.yaml> ===`\n\n### State + progress files (MANDATORY — generated, never hand-edited)\n\n**`run_state.yaml` is edited ONLY via `scripts\u002Frs_update.py` — never with `sed`, `str.replace()`,\nor a from-memory Edit block.** Hand-editing a growing YAML file caused two real production bugs\n(field cross-contamination from copy-pasted entry templates, and silent no-ops when a replace\nanchor didn't byte-match). `rs_update.py` does load→mutate→dump with round-trip validation:\n\n```bash\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> set iteration=N phase_status.rca=done\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> append eval_history '\u003Cjson row>'\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> append rca_reports  '\u003Cjson entry>'\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> budget --substantive +1 --rca +1\n```\n\n**`progress.md` and `progress.html` are GENERATED from `run_state.yaml` — never authored by hand.**\nThey are a pure projection of `eval_history` + `phase_status`, so they cannot drift behind the real\nstate. Regenerate BOTH after every eval (Step 7c) and at Step 2 init:\n\n```bash\npython3 ${SKILL_DIR}\u002Fscripts\u002Fgen_progress.py \u003Crun_dir>\n# prints: === PROGRESS (local file): \u003Crun_dir>\u002Fprogress.md ===  (and progress.html)\n```\n\n(For richer chart annotations, eval_history rows may carry an optional `chart` sub-dict:\n`{ph, t, lr, samp, qas}` — gen_progress.py reads it; absence is fine.)\n\nBoth files + the canonical run_state are what the Step 8a.0 gate asserts are current — not optional.\n`gen_progress.py`\u002F`rs_update.py` also refresh `~\u002F.cache\u002Fsop-ft-orchestrate\u002Factive_run` so the\nharness gate can locate this run_dir even though it lives outside the harness cwd.\n\nInitialize from `${SKILL_DIR}\u002Freferences\u002Frun-state-schema.yaml`. Invariants:\n- **`eval_vision_params`** — re-populate after every VLM training run; must match `train_config.toml [custom.vision]`.\n- **`phase_status`** — `in_progress` BEFORE delegating; `done` AFTER.\n- **`rca_reports`** — every failed iteration must have an entry.\n\n---\n\n## Step 3: Phase 1 — Import Dataset (run once)\n\nCheck: `curl -s http:\u002F\u002Flocalhost:8100\u002Fapi\u002Fv1\u002Fdatasets | python3 -c \"import json,sys; d=json.load(sys.stdin); print([x['id'] for x in d.get('datasets',[])])\"`\n\nIf not imported: copy dataset to `\u003Ctraining_bp_root>\u002Fassets\u002Fdata\u002F`, then `bash ${SKILL_DIR}\u002Fscripts\u002Fimport_dataset.sh \u003Cdataset_id>`. Verify counts.\n- Do NOT re-import on subsequent iterations.\n- Do import every dataset provided, including training and validation\n\n---\n\n## Step 4: Phase 2 — Data Augmentation _(run iter 1 + on augment-config-change)_\n\nIncrement `augmented_dataset_id` suffix; apply RCA augmentation config changes.\n\nGQAs backend (priority order):\n\n**Check for `ANTHROPIC_API_KEY` (HIGHEST PRIORITY):** if set → use Claude (preferred: no GPU, ~10× faster). Set in `augment_config.yaml`:\n\n```yaml\ngqas:\n  enable: true\n  llm_type: \"local\"         # argparse only accepts \"local\" or \"nvidia\"; routing is by model name\n  llm: claude-haiku-4-5-20251001   # detected as Claude by the override; use haiku for speed\u002Fcost\n  local_llm_url: \"\"         # not used for Claude routing\n  enable_thinking: \"false\"\n  num_qa_llm: 8\n  num_qa_per_chunk: 2\n```\n\n  Setup: `${SKILL_DIR}\u002Freferences\u002Fclaude-gqas-setup.md`.\n\n**Fallback: NIM:** valid `NGC_API_KEY` → `llm_type: \"nvidia\"`. After 429 for >5 min → local.\n\n**Fallback: local:** vLLM container `vllm\u002Fvllm-openai@sha256:2e08b462bb444a6da8a84a533f09024c61617574e67386efe4a723a0633fcc6a` with `Qwen\u002FQwen3-8B` (**no** `--reasoning-parser qwen3`). Stop server after augment. Alt: `Qwen\u002FQwen3.5-27B` (requires `--reasoning-parser qwen3`).\n\n- **Never disable GQAs.** Fix start failures; do not set `enable: false`.\n\n### GQAs Pre-flight (local vLLM only)\n\nComplete all three steps in `${SKILL_DIR}\u002Freferences\u002Fgqas-preflight.md` before augmenting: launch, probe-validate, post-augmentation output check.\n\nWrite `phase_status.augment: in_progress` to `run_state.yaml`, then **delegate to `\u002Fsop-data-augmentation`.**\n\nOn success: run Step 3 output check from `${SKILL_DIR}\u002Freferences\u002Fgqas-preflight.md`; write `augmented_dataset_id` and `phase_status.augment: done`.\n\nOn failure: diagnose and fix; Do not skip GQAs unless genuinely unresolvable.\n\nKeep 2 newest `\u003Clabel_data_id>_augmented_*\u002F` dirs. Via `docker exec \u003Cdata_gen_container>`:\n```bash\ndocker exec \u003Cdata_gen_container> bash -c \\\n  \"ls -dt \u002Fworkspace\u002Fassets\u002Fdata\u002F\u003Clabel_data_id>_augmented_*\u002F 2>\u002Fdev\u002Fnull | tail -n +3 | xargs -r rm -rf\"\n```\n\n---\n\n## Step 5: Phase 3 — DDM Training _(run iter 1 + on DDM training-config-change)_\n\nSet: `num_gpus` = GPUs detected; `batch_size`: \u003C 25 GB → 4, \u003C 50 GB → 16, else → 32.\n\nRe-run: apply RCA changes; increment `ddm_config_version`.\n\n**DDM resize augmentation policy (overrides `\u002Fsop-rca-plugin:sop-rca` Pattern 10):**\n\nWhen RandomResize is recommended: **never use `[bilinear, bicubic, nearest]`** on datasets \u003C 20 videos. Use one option at a time:\n- `interpolation: [nearest]` — try first; strongest encoding-robustness signal\n- `interpolation: [bilinear]` — fallback if convergence too slow (loss not decreasing after 10 epochs)\n\nIf neither improves E2E F1, disable RandomResize.\n\nWrite `phase_status.ddm_train: in_progress`, then **delegate to `\u002Fsop-ddm-finetuning` with `\u003Cdataset_id>` and `\u003Cvalidation_dataset_id>` (if available)**.\n\nOn completion: record `ddm_job_id`, `ddm_checkpoint`, `ddm_best_f1`, `ddm_best_loss`. Write `phase_status.ddm_train: done`.\n\nKeep top-3 epoch ckpts by F1; delete rest + `last.ckpt`; delete stale `ddm_inference*.ckpt`. Via `docker exec \u003Cddm_container>`:\n```bash\ndocker exec \u003Cddm_container> bash -c \"\n  ls \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Fepoch_epoch=*-val*.ckpt 2>\u002Fdev\u002Fnull \\\n    | sort -t= -k2 -rn | tail -n +4 | xargs -r rm -f\n  ls \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Fepoch_epoch=*-val*.ckpt 2>\u002Fdev\u002Fnull \\\n    | grep -q . && rm -f \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Flast.ckpt\n  find \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F -name 'ddm_inference*.ckpt' | sort | head -n -1 | xargs -r rm -f\n\"\n```\n\nNote: If best val\u002FF1 \u003C 0.5, log a `manual` note. Do NOT stop — continue evaluating.\n\n### DDM Training Watchdog\n\n```bash\nbash ${SKILL_DIR}\u002Fscripts\u002Fwatch_api_job.sh \\\n  DDM \u003CDDM_BASE_URL> \u003CJOB_ID> \u003CLOG_PATH> \u003CTIMEOUT> 60 \\\n  >> \u003Crun_dir>\u002Fwatchdog_ddm.log 2>&1\n```\n\n```\ntail -f \u003Crun_dir>\u002Fwatchdog_ddm.log | grep --line-buffered -E \"DDM_DONE|DDM_FAILED|DDM_HANG|DDM_TIMEOUT\"\ntail -f \u003Crun_dir>\u002Fwatchdog_ddm.log | grep --line-buffered \"F1_UPDATE\"\n```\n\nMonitor 1: `DDM_DONE` → mark done; `DDM_FAILED` → read log tail, fix, restart; `DDM_HANG`\u002F`DDM_TIMEOUT` → kill container, fix, restart.\nMonitor 2: `F1_UPDATE` → log F1 and loss.\n\nIf Monitor silent >5 min: check `ps aux | grep watch_ddm`; restart watchdog if dead.\n\n| Signal | Auto-fix |\n|--------|----------|\n| `failed` immediately (\u003C 2 min) | Read `results\u002F\u003Cjob_id>\u002Flog.txt` last 30 lines; fix config\u002Fdataset\u002FDB; restart |\n| Loss NaN after first epoch | Halve `optm_lr`; restart |\n| Loss flat for 5 epochs (delta \u003C 5%) | Check `optm_warmup_steps`; if > 30% of total steps, reduce; restart |\n| GPU = 0% for >5 min | Check `docker logs \u003Cddm_container>`; if OOM reduce `batch_size`; if GPU lost restart container + job |\n| `running` after `epochs × expected_epoch_time × 3` | Kill container, read log tail, restart |\n\nWrite `\u003Crun_dir>\u002Fprogress.md` snapshot.\n\n---\n\n## Step 6: Phase 4 — VLM Training _(run iter 1 + on VLM training-config-change or augment-config-change)_\n\n### Batch Size and Learning Rate\n\nSet `train_batch_per_replica` in `train_config.toml`:\n- Sufficient VRAM → 4; Low VRAM → 1. If OOM at batch=4, retry with batch=1.\n\n**Learning rate — MODE-AWARE (LoRA vs full fine-tune). Check whether `[policy.lora]` is present in `train_config.toml`:**\n- **LoRA run** (`[policy.lora]` present): small datasets (\u003C 20 videos) use `optm_lr = [1.5e-5, 1.5e-5, 1.5e-5]`.\n- **Full fine-tune run** (no `[policy.lora]`): small datasets (\u003C 20 videos) use `optm_lr = [5e-6, 5e-6, 5e-6]`\n- Larger datasets (≥ 50 videos): service default may be acceptable; validate after iteration 1.\n- Repeated action pair confusion despite correct DMCQ → check LR first.\n\n### VLM Training Watchdog\n\n```bash\nbash ${SKILL_DIR}\u002Fscripts\u002Fwatch_api_job.sh \\\n  VLM \u003CCR_BASE_URL> \u003CJOB_ID> \u003CLOG_PATH> \u003CTIMEOUT> 120 \\\n  >> \u003Crun_dir>\u002Fwatchdog_vlm.log 2>&1\n```\n\n```\ntail -f \u003Crun_dir>\u002Fwatchdog_vlm.log | grep --line-buffered -E \"VLM_DONE|VLM_FAILED|VLM_HANG|VLM_TIMEOUT\"\ntail -f \u003Crun_dir>\u002Fwatchdog_vlm.log | grep --line-buffered \"status=running\"\n```\n\nMonitor 1: `VLM_DONE` → proceed to 6a; `VLM_FAILED` → read log tail, fix; `VLM_HANG`\u002F`VLM_TIMEOUT` → kill CR container, fix, restart.\n\nIf Monitor silent >10 min: check `ps aux | grep watch_vlm`; restart watchdog if dead.\n\n| Signal | Auto-fix |\n|--------|----------|\n| `failed` immediately (\u003C 5 min) | Read service container logs (dataset mount, DB, config parse); fix and restart |\n| Loss NaN at any step | Cancel; halve all `optm_lr`; restart |\n| Loss drops >90% early AND by-action shows collapse | Note: reduce LR next iteration; do not cancel unless NaN |\n| GPU = 0% for >10 min | Check `docker logs \u003Ccr_container>`; if OOM reduce `train_batch_per_replica` to 1; if GPU reset restart container + job |\n| `running` for > `epochs × ~2h` with no progress | Kill container, read log tail, restart |\n| `failed` after partial training | Check `results\u002F\u003Cjob_id>\u002Fsafetensors\u002F` for valid checkpoint; eval before restarting training |\n\nWhen re-running: apply RCA config changes; increment `vlm_config_version`.\n\nWrite `phase_status.vlm_train: in_progress`, then **delegate to `\u002Fsop-cr-finetuning` with `augmented_dataset_id`.**\n\n### 6a. Record training mode\n\nThe Step 6 delegation to `\u002Fsop-cr-finetuning` runs the whole training procedure end-to-end — including its own LoRA detection and merge. On return, `\u003Cresults_dir>\u002F\u003Ctimestamp>\u002Fsafetensors\u002Fstep_\u003CN>\u002F` is **always** a self-contained, inference-ready HF model.\n\nRecord training mode by checking whether cr-finetuning's merge step left a `step_\u003CN>_lora_adapter\u002F` sibling next to `step_\u003CN>\u002F`:\n\n- **Sibling exists** → LoRA run. cr-finetuning Phase 3b created the backup during the in-place merge.\n- **Sibling absent** → Full fine-tune. No merge was needed; `step_\u003CN>\u002F` was written as a full model directly by training.\n\nSet in `run_state.yaml`:\n\n| Field | LoRA run | Full fine-tune run |\n|-------|----------|--------------------|\n| `vlm_training_mode` | `\"lora\"` | `\"full\"` |\n| `vlm_adapter_path`  | `\u003Cresults_dir>\u002F\u003Cts>\u002Fsafetensors\u002Fstep_\u003CN>_lora_adapter` | `null` |\n| `vlm_inference_path`| `\u003Cresults_dir>\u002F\u003Cts>\u002Fsafetensors\u002Fstep_\u003CN>` | `\u003Cresults_dir>\u002F\u003Cts>\u002Fsafetensors\u002Fstep_\u003CN>` |\n\n`vlm_inference_path` is the same path in both modes. No LoRA-vs-full branching is needed in Step 7.\n\nWrite `phase_status.vlm_train: done` to `run_state.yaml`.\n\nKeep top-3 job_ids by `eval_history.e2e_seq_acc`; delete `*.safetensors` and `adapter_model.*` from others. Never delete `log.txt`, configs, or tokenizer files. Via `docker exec \u003Ccr2_container>`:\n```bash\nKEEP=\"\u003Cjob_id_1> \u003Cjob_id_2> \u003Cjob_id_3>\"  # from run_state.yaml eval_history\ndocker exec \u003Ccr2_container> bash -c \"\n  for d in \u002Fworkspace\u002Fsop-cr-ftms\u002Fassets\u002Fresults\u002F*\u002F; do\n    j=\\$(basename \\\"\\$d\\\")\n    echo '$KEEP' | grep -q \\\"\\$j\\\" && continue\n    find \\\"\\$d\\\" -name '*.safetensors' -o -name 'adapter_model.*' | xargs -r rm -f\n  done\n\"\n```\n\n---\n\n## Step 7: Phase 5 — Evaluation\n\nRun both evaluations in parallel if possible, otherwise sequentially.\n\n**Eval is API-driven.** Both `\u002Fsop-by-action-eval` and `\u002Fsop-e2e-inference` POST to the BP `evaluation-ms` HTTP service (default `localhost:32090`) and return a structured JSON envelope on stdout. Eval-ms decides the output directory (uuid under its `RESULTS_ROOT`); the orchestrator only records the host-side paths from the envelope.\n\n**Pre-eval requirements:**\n- `run_state.training_job_id` and `run_state.val_dataset_id` must be set (populated when the training and dataset registration steps complete).\n- For E2E: `run_state.ddm_training_job_id` must be set.\n- Read `fps`, `max_frames`, `total_pixels` from `train_config.toml [custom.vision]` and write them into the eval inputs.yaml. Never use eval-script defaults.\n- `run_state.host_results_root` must point at the host directory that docker-compose maps to `\u002Fworkspace\u002Fsop-eval-ms\u002Fassets\u002Fresults`. Default: `\u003Cbp_deployment_root>\u002Fassets\u002Fresults`.\n\n### 7-pre. eval-ms reachability check\n\n```bash\ncurl -fsS http:\u002F\u002F${EVAL_HOST:-localhost}:${EVAL_PORT:-32090}\u002Fhealth\n```\n\nNon-2xx → stop and tell the user to bring eval-ms up (`docker compose up evaluation-ms` from the BP deployment root) before retrying.\n\n### 7a. By-Action Evaluation\n\nGenerate `inputs_by_action_iter\u003CN>.yaml` **into `\u003Crun_dir>\u002Fiter\u003CN>\u002F`** from `${SKILL_DIR}\u002Freferences\u002Fby-action-eval-template.yaml`. Required fields: `training_job_id` (from `run_state`), `val_dataset_id`, `host_results_root`. Set `backend: transformers` for LoRA evaluations; `vllm` for full-FT. Pass `fps` from `train_config.toml`.\n\nWrite `phase_status.eval_by_action: in_progress`, then **delegate to `\u002Fsop-by-action-eval`** with the generated inputs.yaml.\n\n**Capture the JSON envelope.** The skill emits a single JSON line on its last stdout. Parse it and persist into `run_state.eval_outputs.by_action`:\n\n```yaml\neval_outputs:\n  by_action:\n    eval_job_id: \u003Cenvelope.eval_job_id>\n    host_output_dir: \u003Cenvelope.host_output_dir>\n    snapshot_dir: \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action       # full copy made in Step 7c\n    inference_results_json: \u003Cenvelope.artifacts.inference_results_json>\n    log: \u003Cenvelope.artifacts.log>\n    overall_accuracy_evalms: \u003Cenvelope.headline_metrics.overall_accuracy>\n    overall_accuracy_authoritative: null   # filled by analyze_by_action_confusion in Step 8b\n```\n\n| Envelope `status` | Action |\n|--------|----------|\n| `completed` | Record `envelope.headline_metrics.overall_accuracy` into `overall_accuracy_evalms`. Snapshot the job dir in Step 7c. Step 8b's `analyze_by_action_confusion.py` populates `overall_accuracy_authoritative`; Step 8a's success-criteria gate uses the authoritative value. Mark `phase_status.eval_by_action: done`. |\n| `failed` | Read `\u003Chost_output_dir>\u002Flog.txt` tail; fix root cause; rerun `\u002Fsop-by-action-eval`. |\n| `timeout` | Eval-ms job may still be running. `curl http:\u002F\u002F\u003Ceval_host>:\u003Ceval_port>\u002Fapi\u002Fv1\u002Fevaluation\u002Fstatus\u002F\u003Ceval_job_id>` to check before retrying. |\n\n### 7b. E2E Evaluation\n\nGenerate `inputs_e2e_iter\u003CN>.yaml` **into `\u003Crun_dir>\u002Fiter\u003CN>\u002F`** from `${SKILL_DIR}\u002Freferences\u002Fe2e-eval-template.yaml`. Required fields: `training_job_id`, `val_dataset_id`, `ddm_training_job_id`, `host_results_root`. Set `score_threshold = run_state.ddm_threshold`. Pass `max_frames`\u002F`total_pixels` through `resolution_config` and `fps` at the top level.\n\nWrite `phase_status.eval_e2e: in_progress`, then **delegate to `\u002Fsop-e2e-inference`**.\n\n**Capture the JSON envelope** and persist into `run_state.eval_outputs.e2e`:\n\n```yaml\neval_outputs:\n  e2e:\n    eval_job_id: \u003Cenvelope.eval_job_id>\n    host_output_dir: \u003Cenvelope.host_output_dir>\n    snapshot_dir: \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e             # full copy made in Step 7c\n    e2e_results_json: \u003Cenvelope.artifacts.e2e_results_json>\n    accuracy_json: \u003Cenvelope.artifacts.accuracy_json>\n    video_name_to_output_text_json: \u003Cenvelope.artifacts.video_name_to_output_text_json>\n    action_recognition_log: \u003Cenvelope.artifacts.action_recognition_log>\n    temporal_segmentation_dir: \u003Cenvelope.artifacts.temporal_segmentation_dir>\n    temporal_segmentation_log: \u003Cenvelope.artifacts.temporal_segmentation_log>\n    sop_e2e_eval_log: \u003Cenvelope.artifacts.sop_e2e_eval_log>\n    log: \u003Cenvelope.artifacts.log>\n```\n\n| Envelope `status` | Action |\n|--------|----------|\n| `completed` | Read `\u003Caccuracy_json>` for `sequence_accuracy`\u002F`action_accuracy`\u002F`wrong`\u002F`duplicate`\u002F`missing`; read `\u003Ce2e_results_json>.temporal_segmentation.avg_f1` for `ddm_f1`. Mark `phase_status.eval_e2e: done`. |\n| `failed` | Read `\u003Csop_e2e_eval_log>` tail; fix root cause; rerun. |\n| `timeout` | Same as 7a — query `\u002Fapi\u002Fv1\u002Fe2e-evaluation\u002Fstatus\u002F\u003Ceval_job_id>` before retry. |\n\n**No file-existence polling, no watchdog scripts.** The eval skill blocks until terminal status and returns the envelope.\n\n### 7c. Record Results\n\n**Snapshot the eval job output(s) into `\u003Crun_dir>\u002Fiter\u003CN>\u002F`**. For each eval run this iteration, full-copy its job dir from the envelope's\n`host_output_dir`:\n\n```bash\n# by-action (if run this iter)\nmkdir -p \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action && cp -a \u003Ceval_outputs.by_action.host_output_dir>\u002F. \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002F\n# e2e (if run this iter)\nmkdir -p \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e        && cp -a \u003Ceval_outputs.e2e.host_output_dir>\u002F.        \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002F\n```\n\n**Append `eval_history` entry** in `run_state.yaml`:\n\n```yaml\neval_history:\n  - iteration: N\n    by_action_acc: 0.XX\n    e2e_action_acc: 0.XX\n    e2e_seq_acc: 0.XX\n    ddm_f1: 0.XX\n    ddm_threshold: 0.XX\n    changes_applied: [\"description of what changed vs prev iteration\"]\n```\n\n**Write progress chart** — every eval, generate `\u003Crun_dir>\u002Fprogress.html`:\n```python\nimport pathlib, json\ntmpl = pathlib.Path('${SKILL_DIR}\u002Freferences\u002Fprogress-chart-template.html').read_text()\ndata = 'const RUN=' + json.dumps({\n  'id': '\u003Crun_id>', 'dataset': '\u003Cdataset_name>', 'target': \u003Cseq_target_as_pct_0to100>,\n  'iters': [\n    # one entry per completed eval — all accuracy fields are 0-100 (not 0-1)\n    # {'n':'1','ph':'I','t':'first','ba':18.2,'ea':33.3,'sq':0,'f1':0.848,'th':0.60,'d':7,'w':11,'m':6,'lr':'1.5e-5','note':'Baseline'},\n  ]\n}) + ';'\npathlib.Path('\u003Crun_dir>\u002Fprogress.html').write_text(tmpl.replace('\u002F* ITER_DATA *\u002F', data))\n```\nSchema: `n`=label, `ph`=I\u002FII\u002FIII (I=pre-key-fix, II=key-fix-iter, III=post-fix), `t`=first\u002FaugVLM\u002Fvlm\u002Fddm\u002Feval, `ba`=by-action%(null if not run), `ea`=E2E-act%, `sq`=seq%, `f1`=DDM-F1, `th`=DDM-thr, `d\u002Fw\u002Fm`=dup\u002Fwrong\u002Fmiss(int), `lr`=LR-string, `note`=one-line change, `samp`=total QA samples (training iters only; omit or 0 for eval-only), `qas`=object with per-type counts `{bcq,mcq,gqa,gqas,dmcq}` (omit for eval-only iters).\n\nThis is a **mandatory local-file write**. One row per eval (eval-only sweeps included — same as\n`eval_history`). After writing, confirm with `=== PROGRESS (local file): \u003Crun_dir>\u002Fprogress.html ===`.\n\n---\n\n## Step 8: Phase 6 — RCA + Decision Loop\n\n>**IMPORTANT**: **RCA is mandatory after every failed iteration.**\n> - Do Not skip RCA.\n> - Do NOT read summary files and write your own RCA.\n> - Do NOT use Step 8b-fallback's heuristics as a routine substitute — they exist ONLY for the case where `\u002Fsop-rca` delegation actually fails (skill missing, error, no report after retry). \n> - Always delegate to `\u002Fsop-rca`. The only sanctioned skip is `run_rca: false` in `inputs.yaml`. Step 8a's pre-flight gate (below) blocks iterations that try to skip RCA.\n\n### 8a. Check Success Criteria\n\n#### 8a.0 — Bookkeeping gate (RUN FIRST, before anything else in Step 8)\n\nThis is the executable form of the invariant promised above. It is a hard **STOP**, not advice.\nYou may not check success criteria, select an action, or declare SUCCESS\u002FPARTIAL until ALL FOUR\nassertions below pass. They are cheap; run them on entry to Step 8 every single iteration.\n\n```python\nbud = run_state.iteration_budget\n\n# (1) Every eval that has been RUN must have an eval_history[] row. One row PER eval —\n#     a 3-point threshold sweep is 3 rows (disambiguated by ddm_threshold \u002F nms_sec \u002F changes_applied),\n#     not 1. This is what was missing when the run drifted: evals happened, rows didn't.\nn_evals_run = count_evals_actually_run()   # = number of \u002Fsop-by-action-eval + \u002Fsop-e2e-inference completions this run\nassert len(run_state.eval_history) == n_evals_run, (\n    f\"BOOKKEEPING GATE: {n_evals_run} evals run but eval_history has \"\n    f\"{len(run_state.eval_history)} rows. Append the missing row(s) NOW — including for \"\n    f\"eval-only threshold\u002FNMS sweeps — before proceeding. Do not batch 'consolidate later'.\"\n)\n\n# (2) Every FAILED eval must have a completed \u002Fsop-rca run behind it (unless run_rca: false).\n#     rca_runs_completed is incremented ONLY in Step 8b after rca_report.md is verified on disk —\n#     never hand-set it. eval-only iterations are NOT exempt: a failed re-eval still needs RCA.\nif inputs.run_rca:\n    n_failed = len([e for e in run_state.eval_history if not meets_criteria(e, inputs.success_criteria)])\n    assert bud.rca_runs_completed == n_failed, (\n        f\"RCA GATE: {n_failed} failed evals but only {bud.rca_runs_completed} RCA runs. \"\n        f\"Run \u002Fsop-rca (Step 8b) on the un-analysed failed eval(s) before selecting any action. \"\n        f\"Writing your own diagnosis instead of delegating to \u002Fsop-rca is the exact violation \"\n        f\"this gate exists to catch.\"\n    )\n\n# (3) Progress files must exist and be current for THIS iteration (local artifacts, Step 2).\n#     progress.md gets this iteration's row; progress.html is regenerated.\nassert progress_md_exists() and last_logged_iter(progress_md) == run_state.iteration, (\n    \"PROGRESS GATE: progress.md missing or stale (no row for current iteration). \"\n    \"Append this iteration's row NOW (Step 7c \u002F Step 9).\"\n)\nassert progress_html_exists(), (\n    \"PROGRESS GATE: progress.html missing. Regenerate it from the template NOW (Step 7c).\"\n)\n\n# (4) Each eval run THIS iteration must be snapshotted into iter\u003CN>\u002F\u003Cphase>\u002F (Step 7c).\n#     This is what gives eval-only iters a folder and pins which eval_job_id was this iter.\nitdir = f\"{run_dir}\u002Fiter{run_state.iteration}\"\nfor phase in evals_run_this_iter():          # subset of {\"by_action\", \"e2e\"}\n    assert snapshot_nonempty(f\"{itdir}\u002F{phase}\"), (\n        f\"SNAPSHOT GATE: {phase} eval ran this iter but {itdir}\u002F{phase}\u002F is missing or empty. \"\n        f\"cp -a \u003Chost_output_dir>\u002F. {itdir}\u002F{phase}\u002F NOW (Step 7c) before proceeding.\"\n    )\n```\n\nIf any assertion fires, the ONLY valid next move is to do the missing work (snapshot eval output \u002F\nappend rows \u002F run RCA \u002F write progress files), not to continue. There is no path through Step 8 that\nleaves these unsatisfied.\n\n#### 8a.1 — Success check\n\n```python\nr = latest_eval\nc = inputs.success_criteria\n\nall_met = all([\n    c.ddm_f1 is None            or r.ddm_f1            >= c.ddm_f1,\n    c.by_action_accuracy is None or r.by_action_acc     >= c.by_action_accuracy,\n    c.e2e_action_accuracy is None or r.e2e_action_acc   >= c.e2e_action_accuracy,\n    c.e2e_sequence_accuracy is None or r.e2e_seq_acc    >= c.e2e_sequence_accuracy,\n])\n```\n\nIf `all_met` → **SUCCESS**. Go to Step 9.\n\n**To trigger PARTIAL, ALL of these must be true:**\n\n```python\nbudget = run_state.iteration_budget\nattempts = budget.attempts\n\npartial_gate = all([\n    budget.iterations_substantive >= budget.max_pipeline_iterations,\n    len(attempts.augment_config_change)    >= 2,    # at least 2 distinct augment strategies tried\n    len(attempts.training_config_change)   >= 1,    # at least 1 training-config-change tried\n    len(attempts.ddm_training_config_change) >= 1,  # at least 1 ddm-training-config-change tried\n])\n```\n\nIf `partial_gate` is True → PARTIAL. Run Step 8b (RCA report is mandatory handoff), then Step 9.\n\n**If `partial_gate` is False — KEEP ITERATING.** Judgment calls (\"more data needed\", \"won't work\") are NOT grounds for PARTIAL without exhausting the substantive budget across all fix categories.\n\n**Common premature-stop antipatterns:**\n- DDM threshold sweeps at 0.3\u002F0.4\u002F0.5\u002F0.6 → eval-only, budget unused.\n- DMCQ retrain regressed → alternative DMCQ mode (adjacent vs confusion) not tried yet.\n- LR not verified correct → fix LR first before concluding training is stalled.\n\nYou **must** run Step 8b before anything in Step 8c.\n\n### 8b. Run RCA (required gate before action selection)\n\nWrite `phase_status.rca: in_progress`, then **dispatch `\u002Fsop-rca` as a sub-agent** (Agent tool, e.g. `subagent_type: general-purpose`) — instruct the sub-agent to invoke the `sop-rca-plugin:sop-rca` skill with the payload below and to return exactly what that skill's \"Invocation & Return Contract\" specifies.\n\n**Why a sub-agent (this is the rule, not an option):** the `\u002Fsop-rca` skill body, its helper-script output, and per-video analysis are large. Running it in a sub-agent keeps ALL of that in the sub-agent's context; the orchestrator receives only the compact `RCA_RESULT:` block. This makes RCA **always affordable no matter how many iterations run** — so there is **never** a context\u002Ftoken reason to skip it or hand-author the RCA yourself. Authoring your own RCA, or reading the eval files and writing your own diagnosis, is a violation (Step 8a's gate catches it); the sub-agent exists precisely to remove the temptation. The `\u002Fsop-rca` skill is path-driven and self-contained, so the fresh sub-agent has everything it needs from the payload.\n\nThe sub-agent reads from the durable `iter\u003CN>\u002F` snapshot (Step 7c) plus the augment\u002FDDM\u002FVLM config snapshots and training log — everything the payload references lives under `\u003Crun_dir>\u002Fiter\u003CN>\u002F`:\n\n```\n\u002Fsop-rca\n  e2e_outputs_dir:       \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_action_recognition\n  ddm_outputs_dir:       \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_temporal_segmentation\n  by_action_results:     \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002Finference_results.json   # JSON preferred; log.txt also accepted by analyze_by_action_confusion.py\n  actions_json:          \u003Cdataset_path>\u002Factions.json\n  augment_config:        \u003Crun_dir>\u002Fiter\u003CN>\u002Faugment_config.yaml\n  ddm_training_config:   \u003Crun_dir>\u002Fiter\u003CN>\u002Fddm_train_config.yaml\n  vlm_training_config:   \u003Crun_dir>\u002Fiter\u003CN>\u002Ftrain_config.toml\n  vlm_training_log:      \u003Crun_dir>\u002Fiter\u003CN>\u002Ftraining.log\n  output_dir:            \u003Crun_dir>\u002Fiter\u003CN>\u002F                                # RCA writes rca_report.md here\n```\n\nNo path-discovery, no copy-of-`actions.json`. The orchestrator already knows `dataset_path`; RCA reads `actions.json` from that location directly. If it's missing, that is a setup bug — surface and stop, do not silently work around.\n\nThe sub-agent's final message is the compact **`RCA_RESULT:` block** (`status`, `report_path`, `rca_analysis_dir`, `headline_metrics`, `typed_actions`, `one_line_verdict`) — NOT the report prose. Consume it directly: read `report_path` (the report + `rca_analysis\u002F` are on disk under `\u003Crun_dir>\u002Fiter\u003CN>\u002F`) and copy `typed_actions` verbatim into `run_state.yaml`'s `rca_reports:`:\n\n```yaml\nrca_reports:\n  - iteration: N\n    report_path: \u003Crun_dir>\u002Fiter\u003CN>\u002Frca_report.md      # from RCA_RESULT.report_path\n    typed_actions:    # verbatim from RCA_RESULT.typed_actions\n      - {action_type: eval-config-change,    pattern: 1, summary: \"...\"}\n      - {action_type: augment-config-change, pattern: 2, summary: \"...\"}\n```\n\nVerify the file at `RCA_RESULT.report_path` exists. If the sub-agent returns `status: failed`, no `RCA_RESULT:` block, or the file is missing — that is a delegation failure: retry the sub-agent once, then fall to Step 8b-fallback only if it fails again (do NOT hand-author the RCA in lieu of delegating). On success, write `phase_status.rca: done` and increment `iteration_budget.rca_runs_completed`.\n\n#### 8b-fallback: When `\u002Fsop-rca` is unavailable\n\n**Use ONLY when delegation to `\u002Fsop-rca` actually fails** — the skill is missing, errors out, or returns no `rca_report.md` after a retry. **Not a substitute for routine RCA.** Recognising one of these patterns from metrics alone is *not* grounds to skip Step 8b — `\u002Fsop-rca` is expected to surface the same patterns plus diagnostics the heuristic table cannot replicate (per-video DDM analysis, residual error budget, signal audit).\n\nWhen delegation has demonstrably failed for the current iteration:\n\n- by-action ≈ 0% across all actions → model collapse (Pattern 9): lower LR, check non-SOP over-weighting, increase number of epochs\n- by-action 0% on a specific action subset only → DMCQ coverage gap (Pattern 2): add confusion_map for that subset\n- E2E seq_acc = 0 but by-action > 95% → DDM threshold too high or DDM under-segmentation: tune threshold first\n- 33+ duplicates in E2E → MCQ max_chunk_len mismatch: reduce to 2\n- Missing actions in E2E → DDM missed boundaries: lower threshold or retrain DDM with RandomResize\n- Loss near zero but accuracy still low → format mismatch or evaluation pipeline bug: check eval container and inference params\n- One duplicate at end of one video while by-action is high → un-annotated tail (mp4 longer than golden). The BP eval-ms handles trim-to-`max(annotation.end_timestamp)` internally; if the artifact still surfaces, the dataset's annotations may be incomplete — verify the val_dataset registration before iterating.\n\nAfter applying a fallback diagnosis: write a brief `\u003Crun_dir>\u002Fiter\u003CN>\u002Frca_report.md` summarising the heuristic chosen and *why \u002Fsop-rca was unavailable*; add an `rca_reports[]` entry with `report_path` and `typed_actions`; set `phase_status.rca: done`; **do not** increment `rca_runs_completed` (it tracks successful RCA runs only); flag the failure under `notes:` so the next iteration retries `\u002Fsop-rca`.\n\n### 8c. Interpret RCA and Select Next Action\n\nPriority applies **only to typed actions in `rca_report.md`** — if a pattern is absent, RCA was incomplete: rerun 8b.\n\nApply **one action per iteration**. Emit full queue to `run_state.yaml` (diversity > depth):\n\n```yaml\niteration_queue:\n  - { iter: N+1, type: substantive, action: training-config-change, hypothesis: \"Correct LR to 5e-6 (small dataset — see LR guidance) before any DMCQ tuning\" }\n  - { iter: N+2, type: substantive, action: augment-config-change, hypothesis: \"DMCQ confusion mode addresses action pair confusion observed in by-action\" }\n  - { iter: N+3, type: substantive, action: augment-config-change, hypothesis: \"DMCQ adjacent mode (alternative signal) if confusion mode regresses or collapses\" }\n  - { iter: N+4, type: substantive, action: ddm-training-config-change, hypothesis: \"RandomResize bilinear to improve DDM generalization\" }\n```\n\nEach remaining slot must propose a **distinct** action category or value. Repeating the same category+value does not advance the budget.\n\n#### Priority 1: eval-config-change\n\n**1a. DDM threshold tuning:** Under-seg (missing actions) → lower by 0.05–0.10 (min 0.35). Over-seg (duplicates) → raise by 0.05. Update `ddm_threshold` to the single RCA-recommended value. → Step 7b → back to Step 8a.\n\n**1b. Wrong VLM inference path:** Fix `vlm_inference_path` (and `vlm_adapter_path` if LoRA). → Step 7 (both evals) → back to Step 8a.\n\n#### Priority 2: DDM training-config-change\n\nApply RCA changes (epochs, resolution, batch_size) to `ddm_train_config.yaml`. Increment `ddm_config_version`. → Step 5. DDM retraining with more data is `manual`.\n\n#### Priority 3: VLM training-config-change (medium cost — retrain VLM only)\n\n**When both LR and confusion_map (augment-config-change) are flagged by RCA:** apply the LR fix first (this iteration); only add\u002Fextend confusion_map next iteration if confusion persists.\n\nApply RCA-recommended config changes to `train_config.toml`. Table = pattern → key path only; RCA value is authoritative:\n\n| RCA pattern | Config key path(s) in `train_config.toml` |\n|-------------|-------------------------------------------|\n| Pattern 8 — fps\u002Fmax_frames mismatch | `custom.vision.fps`, `custom.vision.max_frames`, `custom.vision.total_pixels`, `policy.model_max_length` |\n| Pattern 5a — overfitting | Full FT: `train.epoch`, `train.optm_lr`; enable `train.validation_step`. LoRA: reduce `policy.lora.r` or raise `policy.lora.lora_dropout` (do NOT lower `policy.lora.lora_alpha` for this pattern). |\n| Pattern 5b — underfitting | Full FT: `train.epoch`, `train.optm_lr`. LoRA priority order: 1) if `optm_lr ≤ 5e-6` (e.g. the full-FT small-data value mis-applied to LoRA), raise to ~1.5e-5 FIRST — this is the dominant underfit lever; 2) raise `policy.lora.lora_alpha` to reach `effective_scaling = lora_alpha \u002F r ≥ 32`; 3) raise `train.epoch` (count is dataset-specific — extend until the loss curve plateaus); 4) raise `policy.lora.r` only as a last resort. Never bundle an alpha change with an `r` change in the same iteration. |\n| Pattern 9 — model collapse | Non-SOP collapse → reduce `dynamic_mcq.num_neg` (and DS \u002F EN non-SOP weights); LR-aggressive collapse → reduce `optm_lr`, raise `optm_warmup_steps`; LoRA over-scaling collapse → reduce `policy.lora.lora_alpha`. |\n\nIncrement `vlm_config_version`.\n→ **Go to Step 6** (retrain VLM + merge if LoRA, then re-eval both)\n\n#### Priority 4: augment-config-change (expensive — re-augment AND retrain VLM)\n\nApply config fixes to `augment_config.yaml`. See `${SKILL_DIR}\u002Freferences\u002Faugment-config-guide.md`. Key rules:\n\n- **DMCQ `num_hard_neg`**: 1 for ≤ 3 pairs; 0 for > 3 pairs.\n- **MCQ `max_chunk_len`**: keep at 2; raise to 3 only if DDM under-segments 3+ chunks AND E2E shows MISSING errors.\n- **GQAs**: always `enable: true`; carry Step 4 backend settings forward.\n\n**Building the confusion_map:** Run `analyze_by_action_confusion.py` on by-action results; use only pairs from `Confusion Pairs` output. Start with 1–2 dominant pairs; expand only if they persist.\n\nIncrement `augment_config_version` and generate a new `augmented_dataset_id`.\n→ **Go to Step 4** (re-augment, then retrain VLM + merge, then re-eval both)\n\naugment-config-change does NOT require DDM retraining.\n\n#### Priority 5: code-change\n\nCopy file to `\u003Crun_dir>\u002Foverrides\u002F`, fix it, wire via env var (`SOP_MONITORING_PATH`, `DDM_BASE_PATH_HOST`, etc.) or by mounting the override into the docker container. Re-run affected phase. **Never modify `plugins\u002F`.**\n\n#### Priority 6: manual\n\nLog in final report. **Do NOT block. Continue with other findings.**\n\n### 8d. Worked example — the canonical iteration loop\n\n```\niter1 (substantive):\n  Phase 1–5 (import → augment → DDM train → VLM train → eval)\n  Step 7c: cp -a eval job dirs → iter1\u002Fby_action\u002F + iter1\u002Fe2e\u002F   # ← snapshot, immediately\n           append eval_history[0]; keep eval_outputs pointer; write progress.md\u002Fhtml\n  Step 8a.0: bookkeeping gate passes (1 eval, 1 row, snapshots present, 0 failed-without-RCA yet)\n  Step 8a.1: criteria not met\n  Step 8b: delegate \u002Fsop-rca → write iter1\u002Frca_report.md\n           append rca_reports[0]; phase_status.rca: done\n           rca_runs_completed: 0 → 1\n  Step 8c: pick typed_action from rca_reports[0].typed_actions\n           e.g. {action_type: augment-config-change, pattern: 2}\n  → iter2\n\niter2 (substantive):\n  Phase 2 (re-augment) → Phase 4 (retrain VLM) → Phase 5 (re-eval)\n  append eval_history[1]\n  Step 8a.0: gate passes (2 evals, 2 rows, 1 failed eval == 1 RCA run)\n  Step 8a.1: criteria not met\n  Step 8b: delegate \u002Fsop-rca → iter2\u002Frca_report.md ; rca_runs_completed: 1 → 2\n  Step 8c: typed_action = {eval-config-change, lower ddm_threshold to 0.50}\n  → iter3 (eval-only)\n\niter3 (eval-only — threshold change, budget NOT incremented):\n  Phase 7b only (re-eval E2E at thr=0.50; no retrain, no config snapshot)\n  Step 7c: cp -a e2e job dir → iter3\u002Fe2e\u002F   # ← eval-only STILL gets a folder + snapshot\n           append eval_history[2] (ddm_threshold=0.50 in the row); write progress.md\u002Fhtml\n  Step 8a.0: gate passes (3 evals, 3 rows, iter3\u002Fe2e snapshot present, 2 failed == 2 RCA)\n  Step 8a.1: criteria not met\n  Step 8b: delegate \u002Fsop-rca on the new result → rca_runs_completed: 2 → 3   # ← NOT skipped\n  Step 8c: pick next typed_action\n  → iter4\n\n...\n\niterN (criteria met):\n  Step 7c: snapshot eval dir(s) → iterN\u002F{by_action,e2e}\u002F; append eval_history[...]; write progress\n  Step 8a.0: gate passes (snapshots present, rows current)\n  Step 8a.1: all_met → SUCCESS → Step 9\n```\n\n---\n\n## Step 9: Final Report\n\n### Checkpoint Disk Cleanup (run after each VLM training phase)\n\nAfter each VLM training phase, delete results directories from non-current jobs:\n\n```bash\nKEEP_JOBS=(\"${VLM_JOB_ID}\" \"${PREV_BEST_JOB_ID}\")\nfor DIR in \u003Crun_dir>\u002Fresults\u002F*\u002F; do\n  JOB=$(basename \"$DIR\")\n  if [[ ! \" ${KEEP_JOBS[@]} \" =~ \" ${JOB} \" ]] && [[ \"$JOB\" != \"${DDM_JOB_ID}\" ]]; then\n    rm -rf \"$DIR\"\n  fi\ndone\n```\n\n### Mid-run Progress File\n\nMaintain `\u003Crun_dir>\u002Fprogress.md` after every phase: status, timestamp, key metric, checkpoint path, any auto-fix applied, iteration number, criteria gap remaining. This is a **mandatory local-file write** (created in Step 2). The Step 8a.0 gate refuses to advance if it is missing or stale.\n\n### Final Orchestration Report\n\nWrite `\u003Crun_dir>\u002Forchestrator_report.md`:\n\n```markdown\n# SOP Fine-tuning Orchestration Report\n\n**Run ID:** \u003Crun_id>\n**Dataset:** \u003Cdataset_path>\n**Status:** SUCCESS ✅ | PARTIAL ⚠️ | NEEDS_HUMAN 🔴\n**Total iterations:** N\n**Wall-clock time:** X hr Y min\n\n## Results per Iteration\n\n| Iter | DDM F1 | By-action | E2E action | E2E seq | DDM threshold | Changes |\n|------|--------|-----------|------------|---------|---------------|---------|\n| 1    | 0.412  | 26.7%     | 67.1%      | 0.0%    | 0.60          | baseline |\n| 2    | 0.412  | 94.4%     | 94.3%      | 75.0%   | 0.45          | fps=4\u002Fframes=16, apply LoRA, threshold↓ |\n\n## Final Model Paths\n\n- DDM checkpoint: \u003Cpath\u002Fto\u002Fbest_ddm.ckpt>\n- VLM training mode: \u003Clora | full>\n- VLM inference path: \u003Cvlm_inference_path>          # what to pass to evaluation\n- VLM LoRA adapter: \u003Cvlm_adapter_path>              # omit this line for full fine-tune runs\n\n## Criteria Status\n\n| Criterion | Target | Achieved | Met? |\n|-----------|--------|----------|------|\n| DDM F1    | 0.60   | 0.412    | ❌   |\n| By-action | 0.90   | 94.4%    | ✅   |\n| E2E action| 0.90   | 94.3%    | ✅   |\n| E2E seq   | 0.70   | 75.0%    | ✅   |\n\n## Remaining Issues (manual action required)\n\n- DDM F1 = 0.412 (target 0.60): DDM trained on only 10 videos; recommend annotating 10+ more\n- Action 5 (black antenna) at 50%: black vs white antenna visually similar; add DMCQ confusion_map\n\n## What Was Fixed Automatically\n\n- Iteration 2: Applied fine-tuned LoRA (was using BASE model)\n- Iteration 2: Fixed fps=1\u002Fmax_frames=2 → fps=4\u002Fmax_frames=16\n- Iteration 2: Lowered DDM threshold 0.60 → 0.45 (reduced missing actions 46 → 8)\n```",{"data":35,"body":37},{"name":4,"description":6,"argument-hint":36,"license":26},"\u003Cinputs.yaml> | \"fine-tune on \u002Fpath\u002Fto\u002Fdataset targeting seq_accuracy >= 0.70\"",{"type":38,"children":39},"root",[40,49,56,72,77,137,144,179,429,437,535,554,580,586,599,791,796,801,805,811,836,863,866,872,884,1048,1058,1061,1067,1198,1201,1207,1215,1304,1316,1362,1374,1377,1383,1388,1394,1406,1482,1491,1500,1508,1663,1669,1693,1702,1760,1766,1787,1857,1878,1881,1887,1900,1903,1909,1928,1934,1980,2233,2279,2334,2355,2383,2395,2460,2463,2469,2480,2501,2514,2517,2528,2541,2546,2571,2744,2755,2781,2837,2857,2863,2875,2905,2930,2935,2955,3024,3027,3038,3059,3071,3087,3105,3130,3135,3173,3214,3242,3345,3358,3364,3522,3531,3572,3585,3728,3740,3743,3754,3760,3780,3788,3810,3869,3875,4023,4032,4063,4075,4221,4233,4261,4267,4293,4313,4343,4354,4468,4478,4495,4538,4738,4741,4747,4752,4799,4807,4900,4906,4986,4999,5005,5095,5117,5134,5294,5431,5437,5525,5546,5563,5779,5932,5942,5948,5969,6239,6261,6417,6434,6523,6639,6665,6668,6674,6743,6749,6756,6768,7133,7138,7144,7222,7241,7249,7326,7338,7354,7362,7380,7392,7398,7439,7484,7503,7512,7539,7640,7863,7905,7918,7964,7969,8015,8091,8097,8114,8133,8500,8512,8518,8536,8560,8566,8592,8598,8608,8620,8855,8873,8879,8898,8951,8976,9001,9006,9012,9050,9056,9066,9072,9081,9084,9090,9096,9101,9396,9402,9420,9426,9437,10336],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"sop-fine-tuning-orchestrator",[46],{"type":47,"value":48},"text","SOP Fine-tuning Orchestrator",{"type":41,"tag":50,"props":51,"children":53},"h2",{"id":52},"prime-directive-never-stop-until-the-goal-is-reached",[54],{"type":47,"value":55},"Prime Directive: Never Stop Until the Goal Is Reached",{"type":41,"tag":57,"props":58,"children":59},"blockquote",{},[60],{"type":41,"tag":61,"props":62,"children":63},"p",{},[64,66],{"type":47,"value":65},"IMPORTANT: ",{"type":41,"tag":67,"props":68,"children":69},"strong",{},[70],{"type":47,"value":71},"Never stop unless iterations_substantive >= budget.max_pipeline_iterations, accuracy criteria met, the failure requires locked external systems, or hardware changes.",{"type":41,"tag":61,"props":73,"children":74},{},[75],{"type":47,"value":76},"This means:",{"type":41,"tag":78,"props":79,"children":80},"ul",{},[81,87,114,119],{"type":41,"tag":82,"props":83,"children":84},"li",{},[85],{"type":47,"value":86},"Phase fail → diagnose, fix, restart. Do not report and wait.",{"type":41,"tag":82,"props":88,"children":89},{},[90,97,99,105,107,112],{"type":41,"tag":91,"props":92,"children":94},"code",{"className":93},[],[95],{"type":47,"value":96},"\u002Fsop-rca",{"type":47,"value":98}," delegation FAILED (skill missing or errored) → use the fallback diagnostics in Step 8b for that one iteration; document the failure in ",{"type":41,"tag":91,"props":100,"children":102},{"className":101},[],[103],{"type":47,"value":104},"run_state.yaml",{"type":47,"value":106},"; retry ",{"type":41,"tag":91,"props":108,"children":110},{"className":109},[],[111],{"type":47,"value":96},{"type":47,"value":113}," next iteration.",{"type":41,"tag":82,"props":115,"children":116},{},[117],{"type":47,"value":118},"max_pipeline_iterations reached → write PARTIAL report (Step 9) with remaining gaps and recommended fixes.",{"type":41,"tag":82,"props":120,"children":121},{},[122,124],{"type":47,"value":123},"Hang\u002Fcrash → watchdog diagnoses and restarts autonomously, including code-level fixes. ",{"type":41,"tag":67,"props":125,"children":126},{},[127,129,135],{"type":47,"value":128},"All code fixes follow Override Policy — never modify ",{"type":41,"tag":91,"props":130,"children":132},{"className":131},[],[133],{"type":47,"value":134},"plugins\u002F",{"type":47,"value":136},".",{"type":41,"tag":138,"props":139,"children":141},"h3",{"id":140},"iteration-budget-enforced",[142],{"type":47,"value":143},"Iteration Budget — ENFORCED",{"type":41,"tag":61,"props":145,"children":146},{},[147,149,155,157,162,164,170,172,177],{"type":47,"value":148},"The budget is ",{"type":41,"tag":91,"props":150,"children":152},{"className":151},[],[153],{"type":47,"value":154},"max_pipeline_iterations",{"type":47,"value":156}," (default ",{"type":41,"tag":67,"props":158,"children":159},{},[160],{"type":47,"value":161},"8",{"type":47,"value":163},", set in ",{"type":41,"tag":91,"props":165,"children":167},{"className":166},[],[168],{"type":47,"value":169},"inputs.yaml",{"type":47,"value":171},"). Track it explicitly under ",{"type":41,"tag":91,"props":173,"children":175},{"className":174},[],[176],{"type":47,"value":104},{"type":47,"value":178},":",{"type":41,"tag":180,"props":181,"children":186},"pre",{"className":182,"code":183,"language":184,"meta":185,"style":185},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","iteration_budget:\n  max_pipeline_iterations: 8        # from inputs.yaml\n  iterations_substantive: 0         # cumulative count of retraining iters (categories below)\n  iterations_eval_only: 0           # threshold sweeps, etc — DO NOT count against budget\n  iterations_remaining: 8           # = max - substantive\n  rca_runs_completed: 0             # invariant: must equal count(eval_history entries that miss success_criteria) when run_rca: true\n  attempts:                         # one entry per substantive iter — for the pre-PARTIAL gate\n    augment_config_change: []       # list of distinct configs tried (e.g., [\"DMCQ confusion\", \"DMCQ adjacent\"])\n    training_config_change: []      # e.g., [\"LR corrected to 5e-6\"]\n    ddm_training_config_change: []  # e.g., [\"epochs 30\", \"epochs 30 + RandomResize bilinear\"]\n    code_change: []                 # infra fixes — free, do not count against budget\n","yaml","",[187],{"type":41,"tag":91,"props":188,"children":189},{"__ignoreMap":185},[190,208,233,256,278,300,322,340,363,385,407],{"type":41,"tag":191,"props":192,"children":195},"span",{"class":193,"line":194},"line",1,[196,202],{"type":41,"tag":191,"props":197,"children":199},{"style":198},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[200],{"type":47,"value":201},"iteration_budget",{"type":41,"tag":191,"props":203,"children":205},{"style":204},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[206],{"type":47,"value":207},":\n",{"type":41,"tag":191,"props":209,"children":211},{"class":193,"line":210},2,[212,217,221,227],{"type":41,"tag":191,"props":213,"children":214},{"style":198},[215],{"type":47,"value":216},"  max_pipeline_iterations",{"type":41,"tag":191,"props":218,"children":219},{"style":204},[220],{"type":47,"value":178},{"type":41,"tag":191,"props":222,"children":224},{"style":223},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[225],{"type":47,"value":226}," 8",{"type":41,"tag":191,"props":228,"children":230},{"style":229},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[231],{"type":47,"value":232},"        # from inputs.yaml\n",{"type":41,"tag":191,"props":234,"children":236},{"class":193,"line":235},3,[237,242,246,251],{"type":41,"tag":191,"props":238,"children":239},{"style":198},[240],{"type":47,"value":241},"  iterations_substantive",{"type":41,"tag":191,"props":243,"children":244},{"style":204},[245],{"type":47,"value":178},{"type":41,"tag":191,"props":247,"children":248},{"style":223},[249],{"type":47,"value":250}," 0",{"type":41,"tag":191,"props":252,"children":253},{"style":229},[254],{"type":47,"value":255},"         # cumulative count of retraining iters (categories below)\n",{"type":41,"tag":191,"props":257,"children":259},{"class":193,"line":258},4,[260,265,269,273],{"type":41,"tag":191,"props":261,"children":262},{"style":198},[263],{"type":47,"value":264},"  iterations_eval_only",{"type":41,"tag":191,"props":266,"children":267},{"style":204},[268],{"type":47,"value":178},{"type":41,"tag":191,"props":270,"children":271},{"style":223},[272],{"type":47,"value":250},{"type":41,"tag":191,"props":274,"children":275},{"style":229},[276],{"type":47,"value":277},"           # threshold sweeps, etc — DO NOT count against budget\n",{"type":41,"tag":191,"props":279,"children":281},{"class":193,"line":280},5,[282,287,291,295],{"type":41,"tag":191,"props":283,"children":284},{"style":198},[285],{"type":47,"value":286},"  iterations_remaining",{"type":41,"tag":191,"props":288,"children":289},{"style":204},[290],{"type":47,"value":178},{"type":41,"tag":191,"props":292,"children":293},{"style":223},[294],{"type":47,"value":226},{"type":41,"tag":191,"props":296,"children":297},{"style":229},[298],{"type":47,"value":299},"           # = max - substantive\n",{"type":41,"tag":191,"props":301,"children":303},{"class":193,"line":302},6,[304,309,313,317],{"type":41,"tag":191,"props":305,"children":306},{"style":198},[307],{"type":47,"value":308},"  rca_runs_completed",{"type":41,"tag":191,"props":310,"children":311},{"style":204},[312],{"type":47,"value":178},{"type":41,"tag":191,"props":314,"children":315},{"style":223},[316],{"type":47,"value":250},{"type":41,"tag":191,"props":318,"children":319},{"style":229},[320],{"type":47,"value":321},"             # invariant: must equal count(eval_history entries that miss success_criteria) when run_rca: true\n",{"type":41,"tag":191,"props":323,"children":325},{"class":193,"line":324},7,[326,331,335],{"type":41,"tag":191,"props":327,"children":328},{"style":198},[329],{"type":47,"value":330},"  attempts",{"type":41,"tag":191,"props":332,"children":333},{"style":204},[334],{"type":47,"value":178},{"type":41,"tag":191,"props":336,"children":337},{"style":229},[338],{"type":47,"value":339},"                         # one entry per substantive iter — for the pre-PARTIAL gate\n",{"type":41,"tag":191,"props":341,"children":343},{"class":193,"line":342},8,[344,349,353,358],{"type":41,"tag":191,"props":345,"children":346},{"style":198},[347],{"type":47,"value":348},"    augment_config_change",{"type":41,"tag":191,"props":350,"children":351},{"style":204},[352],{"type":47,"value":178},{"type":41,"tag":191,"props":354,"children":355},{"style":204},[356],{"type":47,"value":357}," []",{"type":41,"tag":191,"props":359,"children":360},{"style":229},[361],{"type":47,"value":362},"       # list of distinct configs tried (e.g., [\"DMCQ confusion\", \"DMCQ adjacent\"])\n",{"type":41,"tag":191,"props":364,"children":366},{"class":193,"line":365},9,[367,372,376,380],{"type":41,"tag":191,"props":368,"children":369},{"style":198},[370],{"type":47,"value":371},"    training_config_change",{"type":41,"tag":191,"props":373,"children":374},{"style":204},[375],{"type":47,"value":178},{"type":41,"tag":191,"props":377,"children":378},{"style":204},[379],{"type":47,"value":357},{"type":41,"tag":191,"props":381,"children":382},{"style":229},[383],{"type":47,"value":384},"      # e.g., [\"LR corrected to 5e-6\"]\n",{"type":41,"tag":191,"props":386,"children":388},{"class":193,"line":387},10,[389,394,398,402],{"type":41,"tag":191,"props":390,"children":391},{"style":198},[392],{"type":47,"value":393},"    ddm_training_config_change",{"type":41,"tag":191,"props":395,"children":396},{"style":204},[397],{"type":47,"value":178},{"type":41,"tag":191,"props":399,"children":400},{"style":204},[401],{"type":47,"value":357},{"type":41,"tag":191,"props":403,"children":404},{"style":229},[405],{"type":47,"value":406},"  # e.g., [\"epochs 30\", \"epochs 30 + RandomResize bilinear\"]\n",{"type":41,"tag":191,"props":408,"children":410},{"class":193,"line":409},11,[411,416,420,424],{"type":41,"tag":191,"props":412,"children":413},{"style":198},[414],{"type":47,"value":415},"    code_change",{"type":41,"tag":191,"props":417,"children":418},{"style":204},[419],{"type":47,"value":178},{"type":41,"tag":191,"props":421,"children":422},{"style":204},[423],{"type":47,"value":357},{"type":41,"tag":191,"props":425,"children":426},{"style":229},[427],{"type":47,"value":428},"                 # infra fixes — free, do not count against budget\n",{"type":41,"tag":61,"props":430,"children":431},{},[432],{"type":41,"tag":67,"props":433,"children":434},{},[435],{"type":47,"value":436},"Iteration types — only \"substantive\" counts against the budget:",{"type":41,"tag":438,"props":439,"children":440},"table",{},[441,465],{"type":41,"tag":442,"props":443,"children":444},"thead",{},[445],{"type":41,"tag":446,"props":447,"children":448},"tr",{},[449,455,460],{"type":41,"tag":450,"props":451,"children":452},"th",{},[453],{"type":47,"value":454},"Type",{"type":41,"tag":450,"props":456,"children":457},{},[458],{"type":47,"value":459},"Budget Counts?",{"type":41,"tag":450,"props":461,"children":462},{},[463],{"type":47,"value":464},"Example",{"type":41,"tag":466,"props":467,"children":468},"tbody",{},[469,492,514],{"type":41,"tag":446,"props":470,"children":471},{},[472,482,487],{"type":41,"tag":473,"props":474,"children":475},"td",{},[476],{"type":41,"tag":91,"props":477,"children":479},{"className":478},[],[480],{"type":47,"value":481},"substantive",{"type":41,"tag":473,"props":483,"children":484},{},[485],{"type":47,"value":486},"✅ counts",{"type":41,"tag":473,"props":488,"children":489},{},[490],{"type":47,"value":491},"augment-config-change, training-config-change, ddm-training-config-change",{"type":41,"tag":446,"props":493,"children":494},{},[495,504,509],{"type":41,"tag":473,"props":496,"children":497},{},[498],{"type":41,"tag":91,"props":499,"children":501},{"className":500},[],[502],{"type":47,"value":503},"eval-only",{"type":41,"tag":473,"props":505,"children":506},{},[507],{"type":47,"value":508},"❌ not counts",{"type":41,"tag":473,"props":510,"children":511},{},[512],{"type":47,"value":513},"DDM threshold sweep with same VLM checkpoint, eval-config-change with same model",{"type":41,"tag":446,"props":515,"children":516},{},[517,526,530],{"type":41,"tag":473,"props":518,"children":519},{},[520],{"type":41,"tag":91,"props":521,"children":523},{"className":522},[],[524],{"type":47,"value":525},"infrastructure",{"type":41,"tag":473,"props":527,"children":528},{},[529],{"type":47,"value":508},{"type":41,"tag":473,"props":531,"children":532},{},[533],{"type":47,"value":534},"code-change for an auto-fixable bug, container restart",{"type":41,"tag":61,"props":536,"children":537},{},[538,540,545,547,552],{"type":47,"value":539},"Only substantive counter matters — 2 retrains + 3 threshold sweeps = ",{"type":41,"tag":67,"props":541,"children":542},{},[543],{"type":47,"value":544},"2\u002F8",{"type":47,"value":546}," budget used. Update ",{"type":41,"tag":91,"props":548,"children":550},{"className":549},[],[551],{"type":47,"value":201},{"type":47,"value":553}," after EVERY iteration.",{"type":41,"tag":61,"props":555,"children":556},{},[557,559,564,566,571,573,578],{"type":47,"value":558},"(Diagnostic heuristics for the rare case where ",{"type":41,"tag":91,"props":560,"children":562},{"className":561},[],[563],{"type":47,"value":96},{"type":47,"value":565}," is ",{"type":41,"tag":67,"props":567,"children":568},{},[569],{"type":47,"value":570},"unavailable",{"type":47,"value":572}," have moved to ",{"type":41,"tag":67,"props":574,"children":575},{},[576],{"type":47,"value":577},"Step 8b-fallback",{"type":47,"value":579},". Do not consult them as a routine substitute for RCA)",{"type":41,"tag":50,"props":581,"children":583},{"id":582},"watchdog-policy",[584],{"type":47,"value":585},"Watchdog Policy",{"type":41,"tag":61,"props":587,"children":588},{},[589,591,597],{"type":47,"value":590},"After every job launch: run with ",{"type":41,"tag":91,"props":592,"children":594},{"className":593},[],[595],{"type":47,"value":596},"run_in_background=true",{"type":47,"value":598},"; do not poll or sleep.",{"type":41,"tag":438,"props":600,"children":601},{},[602,623],{"type":41,"tag":442,"props":603,"children":604},{},[605],{"type":41,"tag":446,"props":606,"children":607},{},[608,613,618],{"type":41,"tag":450,"props":609,"children":610},{},[611],{"type":47,"value":612},"Phase",{"type":41,"tag":450,"props":614,"children":615},{},[616],{"type":47,"value":617},"Mechanism",{"type":41,"tag":450,"props":619,"children":620},{},[621],{"type":47,"value":622},"Terminal signals \u002F outputs",{"type":41,"tag":466,"props":624,"children":625},{},[626,679,734,764],{"type":41,"tag":446,"props":627,"children":628},{},[629,634,645],{"type":41,"tag":473,"props":630,"children":631},{},[632],{"type":47,"value":633},"DDM train",{"type":41,"tag":473,"props":635,"children":636},{},[637,643],{"type":41,"tag":91,"props":638,"children":640},{"className":639},[],[641],{"type":47,"value":642},"watch_api_job.sh",{"type":47,"value":644}," watchdog",{"type":41,"tag":473,"props":646,"children":647},{},[648,654,656,662,663,669,671,677],{"type":41,"tag":91,"props":649,"children":651},{"className":650},[],[652],{"type":47,"value":653},"DDM_DONE",{"type":47,"value":655},", ",{"type":41,"tag":91,"props":657,"children":659},{"className":658},[],[660],{"type":47,"value":661},"DDM_FAILED",{"type":47,"value":655},{"type":41,"tag":91,"props":664,"children":666},{"className":665},[],[667],{"type":47,"value":668},"DDM_HANG",{"type":47,"value":670}," (in ",{"type":41,"tag":91,"props":672,"children":674},{"className":673},[],[675],{"type":47,"value":676},"watchdog_ddm.log",{"type":47,"value":678},")",{"type":41,"tag":446,"props":680,"children":681},{},[682,687,696],{"type":41,"tag":473,"props":683,"children":684},{},[685],{"type":47,"value":686},"VLM train",{"type":41,"tag":473,"props":688,"children":689},{},[690,695],{"type":41,"tag":91,"props":691,"children":693},{"className":692},[],[694],{"type":47,"value":642},{"type":47,"value":644},{"type":41,"tag":473,"props":697,"children":698},{},[699,705,706,712,713,719,720,726,727,733],{"type":41,"tag":91,"props":700,"children":702},{"className":701},[],[703],{"type":47,"value":704},"VLM_DONE",{"type":47,"value":655},{"type":41,"tag":91,"props":707,"children":709},{"className":708},[],[710],{"type":47,"value":711},"VLM_FAILED",{"type":47,"value":655},{"type":41,"tag":91,"props":714,"children":716},{"className":715},[],[717],{"type":47,"value":718},"VLM_HANG",{"type":47,"value":655},{"type":41,"tag":91,"props":721,"children":723},{"className":722},[],[724],{"type":47,"value":725},"VLM_TIMEOUT",{"type":47,"value":670},{"type":41,"tag":91,"props":728,"children":730},{"className":729},[],[731],{"type":47,"value":732},"watchdog_vlm.log",{"type":47,"value":678},{"type":41,"tag":446,"props":735,"children":736},{},[737,742,753],{"type":41,"tag":473,"props":738,"children":739},{},[740],{"type":47,"value":741},"By-action eval",{"type":41,"tag":473,"props":743,"children":744},{},[745,751],{"type":41,"tag":91,"props":746,"children":748},{"className":747},[],[749],{"type":47,"value":750},"\u002Fsop-by-action-eval",{"type":47,"value":752}," skill (blocks on API poll)",{"type":41,"tag":473,"props":754,"children":755},{},[756,758],{"type":47,"value":757},"JSON envelope on stdout — ",{"type":41,"tag":91,"props":759,"children":761},{"className":760},[],[762],{"type":47,"value":763},"status: completed | failed | timeout",{"type":41,"tag":446,"props":765,"children":766},{},[767,772,782],{"type":41,"tag":473,"props":768,"children":769},{},[770],{"type":47,"value":771},"E2E eval",{"type":41,"tag":473,"props":773,"children":774},{},[775,781],{"type":41,"tag":91,"props":776,"children":778},{"className":777},[],[779],{"type":47,"value":780},"\u002Fsop-e2e-inference",{"type":47,"value":752},{"type":41,"tag":473,"props":783,"children":784},{},[785,786],{"type":47,"value":757},{"type":41,"tag":91,"props":787,"children":789},{"className":788},[],[790],{"type":47,"value":763},{"type":41,"tag":61,"props":792,"children":793},{},[794],{"type":47,"value":795},"Training watchdogs remain file-based. Eval uses the blocking skill envelope (Step 7a\u002F7b) — no watchdog log to monitor; the skill returns when eval-ms reports a terminal status.",{"type":41,"tag":61,"props":797,"children":798},{},[799],{"type":47,"value":800},"If Monitor silent >10 min (training): check watchdog process alive; restart if dead.",{"type":41,"tag":802,"props":803,"children":804},"hr",{},[],{"type":41,"tag":50,"props":806,"children":808},{"id":807},"override-policy-never-modify-plugin-files-during-a-run",[809],{"type":47,"value":810},"Override Policy: Never Modify Plugin Files During a Run",{"type":41,"tag":61,"props":812,"children":813},{},[814,826,828,834],{"type":41,"tag":67,"props":815,"children":816},{},[817,819,824],{"type":47,"value":818},"Files inside ",{"type":41,"tag":91,"props":820,"children":822},{"className":821},[],[823],{"type":47,"value":134},{"type":47,"value":825}," are read-only.",{"type":47,"value":827}," Copy any file needing changes to ",{"type":41,"tag":91,"props":829,"children":831},{"className":830},[],[832],{"type":47,"value":833},"\u003Crun_dir>\u002Foverrides\u002F",{"type":47,"value":835}," first, then modify the copy. Pass the override via env vars",{"type":41,"tag":61,"props":837,"children":838},{},[839,841,846,848,854,856,861],{"type":47,"value":840},"Record in ",{"type":41,"tag":91,"props":842,"children":844},{"className":843},[],[845],{"type":47,"value":104},{"type":47,"value":847}," under ",{"type":41,"tag":91,"props":849,"children":851},{"className":850},[],[852],{"type":47,"value":853},"overrides:",{"type":47,"value":855},". Never use ",{"type":41,"tag":91,"props":857,"children":859},{"className":858},[],[860],{"type":47,"value":134},{"type":47,"value":862}," paths.",{"type":41,"tag":802,"props":864,"children":865},{},[],{"type":41,"tag":50,"props":867,"children":869},{"id":868},"pipeline-overview",[870],{"type":47,"value":871},"Pipeline Overview",{"type":41,"tag":61,"props":873,"children":874},{},[875,877,882],{"type":47,"value":876},"DDM and VLM are ",{"type":41,"tag":67,"props":878,"children":879},{},[880],{"type":47,"value":881},"independent retry axes",{"type":47,"value":883}," — each can be retrained without touching the other.\nThe table shows which steps run for each action type:",{"type":41,"tag":438,"props":885,"children":886},{},[887,918],{"type":41,"tag":442,"props":888,"children":889},{},[890],{"type":41,"tag":446,"props":891,"children":892},{},[893,898,903,908,913],{"type":41,"tag":450,"props":894,"children":895},{},[896],{"type":47,"value":897},"Action type",{"type":41,"tag":450,"props":899,"children":900},{},[901],{"type":47,"value":902},"Step 4 Augment",{"type":41,"tag":450,"props":904,"children":905},{},[906],{"type":47,"value":907},"Step 5 DDM",{"type":41,"tag":450,"props":909,"children":910},{},[911],{"type":47,"value":912},"Step 6 VLM",{"type":41,"tag":450,"props":914,"children":915},{},[916],{"type":47,"value":917},"Step 7 Eval",{"type":41,"tag":466,"props":919,"children":920},{},[921,947,972,997,1022],{"type":41,"tag":446,"props":922,"children":923},{},[924,929,934,938,942],{"type":41,"tag":473,"props":925,"children":926},{},[927],{"type":47,"value":928},"eval-config-change",{"type":41,"tag":473,"props":930,"children":931},{},[932],{"type":47,"value":933},"❌",{"type":41,"tag":473,"props":935,"children":936},{},[937],{"type":47,"value":933},{"type":41,"tag":473,"props":939,"children":940},{},[941],{"type":47,"value":933},{"type":41,"tag":473,"props":943,"children":944},{},[945],{"type":47,"value":946},"E2E only",{"type":41,"tag":446,"props":948,"children":949},{},[950,955,959,964,968],{"type":41,"tag":473,"props":951,"children":952},{},[953],{"type":47,"value":954},"DDM training-config-change",{"type":41,"tag":473,"props":956,"children":957},{},[958],{"type":47,"value":933},{"type":41,"tag":473,"props":960,"children":961},{},[962],{"type":47,"value":963},"✅ retrain",{"type":41,"tag":473,"props":965,"children":966},{},[967],{"type":47,"value":933},{"type":41,"tag":473,"props":969,"children":970},{},[971],{"type":47,"value":946},{"type":41,"tag":446,"props":973,"children":974},{},[975,980,984,988,992],{"type":41,"tag":473,"props":976,"children":977},{},[978],{"type":47,"value":979},"VLM training-config-change",{"type":41,"tag":473,"props":981,"children":982},{},[983],{"type":47,"value":933},{"type":41,"tag":473,"props":985,"children":986},{},[987],{"type":47,"value":933},{"type":41,"tag":473,"props":989,"children":990},{},[991],{"type":47,"value":963},{"type":41,"tag":473,"props":993,"children":994},{},[995],{"type":47,"value":996},"Both",{"type":41,"tag":446,"props":998,"children":999},{},[1000,1005,1010,1014,1018],{"type":41,"tag":473,"props":1001,"children":1002},{},[1003],{"type":47,"value":1004},"augment-config-change",{"type":41,"tag":473,"props":1006,"children":1007},{},[1008],{"type":47,"value":1009},"✅ re-augment",{"type":41,"tag":473,"props":1011,"children":1012},{},[1013],{"type":47,"value":933},{"type":41,"tag":473,"props":1015,"children":1016},{},[1017],{"type":47,"value":963},{"type":41,"tag":473,"props":1019,"children":1020},{},[1021],{"type":47,"value":996},{"type":41,"tag":446,"props":1023,"children":1024},{},[1025,1030,1035,1040,1044],{"type":41,"tag":473,"props":1026,"children":1027},{},[1028],{"type":47,"value":1029},"code-change",{"type":41,"tag":473,"props":1031,"children":1032},{},[1033],{"type":47,"value":1034},"depends on phase",{"type":41,"tag":473,"props":1036,"children":1037},{},[1038],{"type":47,"value":1039},"depends",{"type":41,"tag":473,"props":1041,"children":1042},{},[1043],{"type":47,"value":1039},{"type":41,"tag":473,"props":1045,"children":1046},{},[1047],{"type":47,"value":1039},{"type":41,"tag":180,"props":1049,"children":1053},{"className":1050,"code":1052,"language":47},[1051],"language-text","[Step 1] Prerequisites\n      │\n      ▼\n[Step 2] Initialize run_state.yaml\n      │\n      ▼\n[Step 3] Import dataset ── run ONCE, never repeated\n      │\n      ▼\n[Step 4] Data Augmentation  ◄── augment-config-change (DMCQ, confusion_map, MCQ max_chunk_len)\n         BCQ · MCQ · GoldenGQA · GQAs · DMCQ · DS            [DDM unaffected — skip Step 5]\n      │\n      ▼\n[Step 5] DDM-Net Training  ◄── DDM training-config-change (resolution, RandomResize, epochs)\n         ResNet-50 boundary detector                         [skip Step 4 + Step 6]\n      │\n      ▼\n[Step 6] VLM Training  ◄────── VLM training-config-change (LR, fps\u002Fmax_frames)\n         Cosmos-Reason2-2B SFT + LoRA merge if applicable   [skip Step 4 + Step 5]\n      │\n      ▼\n[Step 7] Evaluate\n      ├── 7a By-Action  (VLM in isolation, perfect segmentation)\n      └── 7b E2E        (DDM + VLM full pipeline)\n            │  [DDM-only retrain → Step 7b only; VLM or augment → both 7a + 7b]\n      ▼\n[Step 8] RCA + Decision Loop\n      │\n      ├── ALL criteria met ─────────────────────────────────► DONE ✅\n      │\n      ├── eval-config-change ──────────────────────────────► Step 7 → Step 8\n      │\n      ├── DDM training-config-change ─────────────────────► Step 5 → Step 7b → Step 8\n      │   resolution · RandomResize · epochs                 (augment + VLM unchanged)\n      │\n      ├── VLM training-config-change ─────────────────────► Step 6 → Step 7 → Step 8\n      │   LR · fps\u002Fmax_frames mismatch                       (augment + DDM unchanged)\n      │\n      ├── augment-config-change ───────────────────────────► Step 4 → Step 6 → Step 7 → Step 8\n      │   DMCQ · confusion_map · MCQ max_chunk_len           (DDM unchanged — skip Step 5)\n      │\n      ├── code-change ──────────────────────────────────────► override fix → retry phase\n      │\n      └── max iterations or manual ──────────────────────────► Step 9 PARTIAL + hand off\n",[1054],{"type":41,"tag":91,"props":1055,"children":1056},{"__ignoreMap":185},[1057],{"type":47,"value":1052},{"type":41,"tag":802,"props":1059,"children":1060},{},[],{"type":41,"tag":50,"props":1062,"children":1064},{"id":1063},"reference-documents",[1065],{"type":47,"value":1066},"Reference Documents",{"type":41,"tag":78,"props":1068,"children":1069},{},[1070,1081,1092,1103,1114,1125,1136,1147,1165,1176,1187],{"type":41,"tag":82,"props":1071,"children":1072},{},[1073,1079],{"type":41,"tag":91,"props":1074,"children":1076},{"className":1075},[],[1077],{"type":47,"value":1078},"${SKILL_DIR}\u002Freferences\u002Finputs-template.yaml",{"type":47,"value":1080}," — all config fields",{"type":41,"tag":82,"props":1082,"children":1083},{},[1084,1090],{"type":41,"tag":91,"props":1085,"children":1087},{"className":1086},[],[1088],{"type":47,"value":1089},"${SKILL_DIR}\u002Freferences\u002Fdecision-logic.md",{"type":47,"value":1091}," — RCA action type → pipeline response mapping",{"type":41,"tag":82,"props":1093,"children":1094},{},[1095,1101],{"type":41,"tag":91,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":47,"value":1100},"${SKILL_DIR}\u002Freferences\u002Fprerequisites.md",{"type":47,"value":1102}," — pre-flight checklist",{"type":41,"tag":82,"props":1104,"children":1105},{},[1106,1112],{"type":41,"tag":91,"props":1107,"children":1109},{"className":1108},[],[1110],{"type":47,"value":1111},"${SKILL_DIR}\u002Freferences\u002Frun-state-schema.yaml",{"type":47,"value":1113}," — full run_state.yaml template with field annotations",{"type":41,"tag":82,"props":1115,"children":1116},{},[1117,1123],{"type":41,"tag":91,"props":1118,"children":1120},{"className":1119},[],[1121],{"type":47,"value":1122},"${SKILL_DIR}\u002Freferences\u002Fgqas-preflight.md",{"type":47,"value":1124}," — local vLLM launch, probe-validate, and output check (Steps 1–3)",{"type":41,"tag":82,"props":1126,"children":1127},{},[1128,1134],{"type":41,"tag":91,"props":1129,"children":1131},{"className":1130},[],[1132],{"type":47,"value":1133},"${SKILL_DIR}\u002Freferences\u002Fclaude-gqas-setup.md",{"type":47,"value":1135}," — Claude API backend setup: patch, restart, verify",{"type":41,"tag":82,"props":1137,"children":1138},{},[1139,1145],{"type":41,"tag":91,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":47,"value":1144},"${SKILL_DIR}\u002Fscripts\u002Fwatch_api_job.sh",{"type":47,"value":1146}," — watchdog for API-polled jobs (DDM, VLM training)",{"type":41,"tag":82,"props":1148,"children":1149},{},[1150,1152,1157,1158,1163],{"type":47,"value":1151},"Eval jobs (",{"type":41,"tag":91,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":47,"value":750},{"type":47,"value":655},{"type":41,"tag":91,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":47,"value":780},{"type":47,"value":1164},") are NOT watchdogged — the eval skills block until the eval-ms HTTP job reaches a terminal state and return a JSON envelope.",{"type":41,"tag":82,"props":1166,"children":1167},{},[1168,1174],{"type":41,"tag":91,"props":1169,"children":1171},{"className":1170},[],[1172],{"type":47,"value":1173},"${SKILL_DIR}\u002Fscripts\u002Fauto_detect_splits.py",{"type":47,"value":1175}," — auto-detect train\u002Ftest split subdirectories",{"type":41,"tag":82,"props":1177,"children":1178},{},[1179,1185],{"type":41,"tag":91,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":47,"value":1184},"${SKILL_DIR}\u002Fscripts\u002Fimport_dataset.sh",{"type":47,"value":1186}," - import annotated dataset",{"type":41,"tag":82,"props":1188,"children":1189},{},[1190,1196],{"type":41,"tag":91,"props":1191,"children":1193},{"className":1192},[],[1194],{"type":47,"value":1195},"${SKILL_DIR}\u002Freferences\u002Faugment-config-guide.md",{"type":47,"value":1197}," — annotated augment_config.yaml template (DMCQ, MCQ, GQAs)",{"type":41,"tag":802,"props":1199,"children":1200},{},[],{"type":41,"tag":50,"props":1202,"children":1204},{"id":1203},"resume-protocol",[1205],{"type":47,"value":1206},"Resume Protocol",{"type":41,"tag":61,"props":1208,"children":1209},{},[1210],{"type":41,"tag":67,"props":1211,"children":1212},{},[1213],{"type":47,"value":1214},"Run at the very start of every session:",{"type":41,"tag":180,"props":1216,"children":1220},{"className":1217,"code":1218,"language":1219,"meta":185,"style":185},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","ls \u003Coutput_dir>\u002Frun_*\u002Frun_state.yaml 2>\u002Fdev\u002Fnull | sort | tail -1\n","bash",[1221],{"type":41,"tag":91,"props":1222,"children":1223},{"__ignoreMap":185},[1224],{"type":41,"tag":191,"props":1225,"children":1226},{"class":193,"line":194},[1227,1233,1238,1244,1250,1255,1260,1265,1270,1275,1280,1285,1290,1294,1299],{"type":41,"tag":191,"props":1228,"children":1230},{"style":1229},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1231],{"type":47,"value":1232},"ls",{"type":41,"tag":191,"props":1234,"children":1235},{"style":204},[1236],{"type":47,"value":1237}," \u003C",{"type":41,"tag":191,"props":1239,"children":1241},{"style":1240},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1242],{"type":47,"value":1243},"output_di",{"type":41,"tag":191,"props":1245,"children":1247},{"style":1246},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1248],{"type":47,"value":1249},"r",{"type":41,"tag":191,"props":1251,"children":1252},{"style":204},[1253],{"type":47,"value":1254},">",{"type":41,"tag":191,"props":1256,"children":1257},{"style":1240},[1258],{"type":47,"value":1259},"\u002Frun_",{"type":41,"tag":191,"props":1261,"children":1262},{"style":1246},[1263],{"type":47,"value":1264},"*",{"type":41,"tag":191,"props":1266,"children":1267},{"style":1240},[1268],{"type":47,"value":1269},"\u002Frun_state.yaml",{"type":41,"tag":191,"props":1271,"children":1272},{"style":204},[1273],{"type":47,"value":1274}," 2>",{"type":41,"tag":191,"props":1276,"children":1277},{"style":1240},[1278],{"type":47,"value":1279},"\u002Fdev\u002Fnull",{"type":41,"tag":191,"props":1281,"children":1282},{"style":204},[1283],{"type":47,"value":1284}," |",{"type":41,"tag":191,"props":1286,"children":1287},{"style":1229},[1288],{"type":47,"value":1289}," sort",{"type":41,"tag":191,"props":1291,"children":1292},{"style":204},[1293],{"type":47,"value":1284},{"type":41,"tag":191,"props":1295,"children":1296},{"style":1229},[1297],{"type":47,"value":1298}," tail",{"type":41,"tag":191,"props":1300,"children":1301},{"style":1240},[1302],{"type":47,"value":1303}," -1\n",{"type":41,"tag":61,"props":1305,"children":1306},{},[1307,1309,1314],{"type":47,"value":1308},"If a ",{"type":41,"tag":91,"props":1310,"children":1312},{"className":1311},[],[1313],{"type":47,"value":104},{"type":47,"value":1315}," is found:",{"type":41,"tag":1317,"props":1318,"children":1319},"ol",{},[1320,1331,1350],{"type":41,"tag":82,"props":1321,"children":1322},{},[1323,1325],{"type":47,"value":1324},"Print full contents with ",{"type":41,"tag":91,"props":1326,"children":1328},{"className":1327},[],[1329],{"type":47,"value":1330},"=== RESUMING RUN: \u003Crun_id> ===",{"type":41,"tag":82,"props":1332,"children":1333},{},[1334,1340,1342,1348],{"type":41,"tag":91,"props":1335,"children":1337},{"className":1336},[],[1338],{"type":47,"value":1339},"done",{"type":47,"value":1341}," → skip. ",{"type":41,"tag":91,"props":1343,"children":1345},{"className":1344},[],[1346],{"type":47,"value":1347},"in_progress",{"type":47,"value":1349}," → verify: DDM\u002FVLM: check API status; eval: check output file exists; augment: check augmented dir exists.",{"type":41,"tag":82,"props":1351,"children":1352},{},[1353,1355,1360],{"type":47,"value":1354},"Continue from first non-",{"type":41,"tag":91,"props":1356,"children":1358},{"className":1357},[],[1359],{"type":47,"value":1339},{"type":47,"value":1361}," phase.",{"type":41,"tag":61,"props":1363,"children":1364},{},[1365,1367,1372],{"type":47,"value":1366},"If no ",{"type":41,"tag":91,"props":1368,"children":1370},{"className":1369},[],[1371],{"type":47,"value":104},{"type":47,"value":1373}," exists — proceed to Step 0.",{"type":41,"tag":802,"props":1375,"children":1376},{},[],{"type":41,"tag":50,"props":1378,"children":1380},{"id":1379},"step-0-parse-inputs",[1381],{"type":47,"value":1382},"Step 0: Parse Inputs",{"type":41,"tag":61,"props":1384,"children":1385},{},[1386],{"type":47,"value":1387},"Read the inputs.yaml (or parse natural language). Resolve all paths. Set defaults. Print config summary and confirm with user before starting:",{"type":41,"tag":138,"props":1389,"children":1391},{"id":1390},"output-directory-contract-mandatory",[1392],{"type":47,"value":1393},"Output Directory Contract (mandatory)",{"type":41,"tag":61,"props":1395,"children":1396},{},[1397,1399,1404],{"type":47,"value":1398},"There are ",{"type":41,"tag":67,"props":1400,"children":1401},{},[1402],{"type":47,"value":1403},"two trees",{"type":47,"value":1405}," in an orchestrated run, owned by different things:",{"type":41,"tag":1317,"props":1407,"children":1408},{},[1409,1420],{"type":41,"tag":82,"props":1410,"children":1411},{},[1412,1418],{"type":41,"tag":91,"props":1413,"children":1415},{"className":1414},[],[1416],{"type":47,"value":1417},"\u003Crun_dir>\u002F",{"type":47,"value":1419}," — owned by the orchestrator. Contains run-state, per-iter configs, RCA reports, progress, watchdogs, and a per-iter snapshot of each eval job's output.",{"type":41,"tag":82,"props":1421,"children":1422},{},[1423,1429,1431,1436,1438,1443,1445,1450,1452,1458,1460,1466,1467,1472,1474,1480],{"type":41,"tag":91,"props":1424,"children":1426},{"className":1425},[],[1427],{"type":47,"value":1428},"\u003Chost_results_root>\u002F\u003Ceval_job_id>\u002F",{"type":47,"value":1430}," — owned by ",{"type":41,"tag":67,"props":1432,"children":1433},{},[1434],{"type":47,"value":1435},"eval-ms",{"type":47,"value":1437},". Each ",{"type":41,"tag":91,"props":1439,"children":1441},{"className":1440},[],[1442],{"type":47,"value":750},{"type":47,"value":1444}," and ",{"type":41,"tag":91,"props":1446,"children":1448},{"className":1447},[],[1449],{"type":47,"value":780},{"type":47,"value":1451}," invocation produces one such directory; eval-ms decides the uuid. The orchestrator never ",{"type":41,"tag":1453,"props":1454,"children":1455},"em",{},[1456],{"type":47,"value":1457},"writes",{"type":47,"value":1459}," here, but it does two things after each eval: (a) records pointers in ",{"type":41,"tag":91,"props":1461,"children":1463},{"className":1462},[],[1464],{"type":47,"value":1465},"run_state.eval_outputs",{"type":47,"value":655},{"type":41,"tag":67,"props":1468,"children":1469},{},[1470],{"type":47,"value":1471},"and",{"type":47,"value":1473}," (b) snapshots the job's output into ",{"type":41,"tag":91,"props":1475,"children":1477},{"className":1476},[],[1478],{"type":47,"value":1479},"\u003Crun_dir>\u002Fiter\u003CN>\u002F{by_action,e2e}\u002F",{"type":47,"value":1481}," so the run dir is self-contained and survives any later cleanup of the eval-ms store.",{"type":41,"tag":180,"props":1483,"children":1486},{"className":1484,"code":1485,"language":47},[1051],"\u003Coutput_dir>\u002F                              # from inputs.yaml; default .\u002Fsop_fine_tune\n└── run_\u003CYYYYMMDD_HHMMSS>\u002F                 # = \u003Crun_dir>; created in Step 2\n    ├── run_state.yaml                     # full run state — incl. eval_outputs pointers (KEPT)\n    ├── progress.md, progress.html         # phase logs + live progress chart\n    ├── orchestrator_report.md             # final SUCCESS \u002F PARTIAL summary\n    ├── overrides\u002F                         # code overrides per Override Policy\n    ├── watchdog_*.log                     # DDM\u002FVLM training watchdog tails\n    └── iter\u003CN>\u002F\n        ├── augment_config.yaml            # snapshot of augment config used\n        ├── ddm_train_config.yaml          # snapshot of DDM training config\n        ├── train_config.toml              # snapshot of VLM training config\n        ├── training.log                   # copy of VLM training log\n        ├── inputs_by_action_iter\u003CN>.yaml  # generated per-iter eval input (moved here, off top level)\n        ├── inputs_e2e_iter\u003CN>.yaml        # generated per-iter eval input\n        ├── by_action\u002F                     # snapshot of the by-action eval job output\n        ├── e2e\u002F                           # snapshot of the e2e eval job output\n        ├── rca_analysis\u002F                  # \u002Fsop-rca helper JSONs\n        └── rca_report.md                  # \u002Fsop-rca formal report (REQUIRED on failure)\n",[1487],{"type":41,"tag":91,"props":1488,"children":1489},{"__ignoreMap":185},[1490],{"type":47,"value":1485},{"type":41,"tag":180,"props":1492,"children":1495},{"className":1493,"code":1494,"language":47},[1051],"\u003Chost_results_root>\u002F                       # docker-compose volume\n├── \u003Cby_action_eval_job_id>\u002F               # \u002Fsop-by-action-eval job output\n│   ├── inference_results.json\n│   ├── log.txt\n│   └── assets\u002F\n└── \u003Ce2e_eval_job_id>\u002F                     # \u002Fsop-e2e-inference job output\n    ├── e2e_results.json\n    ├── log.txt\n    ├── sop_e2e_eval_log.txt\n    ├── outputs_action_recognition\u002F\n    │   ├── accuracy.json\n    │   ├── video_name_to_output_text.json\n    │   └── action_recognition_multi_gpu.log\n    └── outputs_temporal_segmentation\u002F\n        ├── f1_\u003Cthr>.json\n        ├── video_to_boundaries_debug.json\n        ├── video_to_ddm_info_debug.json\n        ├── temporal_segmentation.log\n        └── \u003Cvideo>.png\n",[1496],{"type":41,"tag":91,"props":1497,"children":1498},{"__ignoreMap":185},[1499],{"type":47,"value":1494},{"type":41,"tag":61,"props":1501,"children":1502},{},[1503],{"type":41,"tag":67,"props":1504,"children":1505},{},[1506],{"type":47,"value":1507},"Hard rules:",{"type":41,"tag":78,"props":1509,"children":1510},{},[1511,1546,1597,1610,1630,1650],{"type":41,"tag":82,"props":1512,"children":1513},{},[1514,1516,1522,1524,1529,1531,1536,1538,1544],{"type":47,"value":1515},"The orchestrator MUST pass ",{"type":41,"tag":91,"props":1517,"children":1519},{"className":1518},[],[1520],{"type":47,"value":1521},"output_dir=\u003Crun_dir>\u002Fiter\u003CN>",{"type":47,"value":1523}," when delegating to ",{"type":41,"tag":91,"props":1525,"children":1527},{"className":1526},[],[1528],{"type":47,"value":96},{"type":47,"value":1530}," in Step 8b (see \"RCA delegation contract\" below). Never let ",{"type":41,"tag":91,"props":1532,"children":1534},{"className":1533},[],[1535],{"type":47,"value":96},{"type":47,"value":1537}," default to ",{"type":41,"tag":91,"props":1539,"children":1541},{"className":1540},[],[1542],{"type":47,"value":1543},"\u003Ccwd>\u002Frca_reports\u002F",{"type":47,"value":1545}," — that splits artifacts.",{"type":41,"tag":82,"props":1547,"children":1548},{},[1549,1551,1557,1559,1564,1566,1571,1573,1579,1581,1587,1589,1595],{"type":47,"value":1550},"The orchestrator MUST NOT pass ",{"type":41,"tag":91,"props":1552,"children":1554},{"className":1553},[],[1555],{"type":47,"value":1556},"output_dir",{"type":47,"value":1558}," to ",{"type":41,"tag":91,"props":1560,"children":1562},{"className":1561},[],[1563],{"type":47,"value":750},{"type":47,"value":1565}," or ",{"type":41,"tag":91,"props":1567,"children":1569},{"className":1568},[],[1570],{"type":47,"value":780},{"type":47,"value":1572},". Those skills do not accept an output-dir override — eval-ms decides where the job writes. The orchestrator captures the returned ",{"type":41,"tag":91,"props":1574,"children":1576},{"className":1575},[],[1577],{"type":47,"value":1578},"host_output_dir",{"type":47,"value":1580}," from each skill's JSON envelope and (a) persists it to ",{"type":41,"tag":91,"props":1582,"children":1584},{"className":1583},[],[1585],{"type":47,"value":1586},"run_state.eval_outputs.\u003Cphase>.host_output_dir",{"type":47,"value":1588},", then (b) snapshots that directory into ",{"type":41,"tag":91,"props":1590,"children":1592},{"className":1591},[],[1593],{"type":47,"value":1594},"\u003Crun_dir>\u002Fiter\u003CN>\u002F\u003Cphase>\u002F",{"type":47,"value":1596}," (Step 7c).",{"type":41,"tag":82,"props":1598,"children":1599},{},[1600,1602,1608],{"type":47,"value":1601},"The eval snapshot is a full recursive copy of the eval-ms job dir (e.g. ",{"type":41,"tag":91,"props":1603,"children":1605},{"className":1604},[],[1606],{"type":47,"value":1607},"cp -a \u003Chost_output_dir>\u002F. \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002F",{"type":47,"value":1609},"). Copy everything the job wrote; do not hand-pick files.",{"type":41,"tag":82,"props":1611,"children":1612},{},[1613,1615,1620,1622,1628],{"type":47,"value":1614},"All ad-hoc analyses produced by the orchestrator (helper-script outputs, debug dumps, scratch yamls) MUST live under ",{"type":41,"tag":91,"props":1616,"children":1618},{"className":1617},[],[1619],{"type":47,"value":1417},{"type":47,"value":1621}," — never under ",{"type":41,"tag":91,"props":1623,"children":1625},{"className":1624},[],[1626],{"type":47,"value":1627},"\u003Ccwd>\u002F",{"type":47,"value":1629}," and never under any plugin path.",{"type":41,"tag":82,"props":1631,"children":1632},{},[1633,1635,1641,1643,1648],{"type":47,"value":1634},"One run = one ",{"type":41,"tag":91,"props":1636,"children":1638},{"className":1637},[],[1639],{"type":47,"value":1640},"\u003Crun_dir>",{"type":47,"value":1642},". Resumes write into the same ",{"type":41,"tag":91,"props":1644,"children":1646},{"className":1645},[],[1647],{"type":47,"value":1640},{"type":47,"value":1649}," discovered by the Resume Protocol.",{"type":41,"tag":82,"props":1651,"children":1652},{},[1653,1655,1661],{"type":47,"value":1654},"Eval-ms-owned directories under ",{"type":41,"tag":91,"props":1656,"children":1658},{"className":1657},[],[1659],{"type":47,"value":1660},"\u003Chost_results_root>\u002F",{"type":47,"value":1662}," are not garbage-collected by the orchestrator.",{"type":41,"tag":138,"props":1664,"children":1666},{"id":1665},"rca-delegation-contract-step-8b-call-site",[1667],{"type":47,"value":1668},"RCA delegation contract (Step 8b call site)",{"type":41,"tag":61,"props":1670,"children":1671},{},[1672,1677,1679,1684,1686,1692],{"type":41,"tag":91,"props":1673,"children":1675},{"className":1674},[],[1676],{"type":47,"value":96},{"type":47,"value":1678}," reads paths it was told about — it does NOT construct paths from conventions. The orchestrator builds the delegation payload from ",{"type":41,"tag":91,"props":1680,"children":1682},{"className":1681},[],[1683],{"type":47,"value":1465},{"type":47,"value":1685}," (populated by Step 7a\u002F7b) plus the snapshots it placed under ",{"type":41,"tag":91,"props":1687,"children":1689},{"className":1688},[],[1690],{"type":47,"value":1691},"\u003Crun_dir>\u002Fiter\u003CN>\u002F",{"type":47,"value":178},{"type":41,"tag":180,"props":1694,"children":1697},{"className":1695,"code":1696,"language":47},[1051],"\u002Fsop-rca \\\n  e2e_outputs_dir=\u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_action_recognition \\\n  ddm_outputs_dir=\u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_temporal_segmentation \\\n  by_action_results=\u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002Finference_results.json \\   # JSON is preferred; log.txt also accepted\n  actions_json=\u003Cdataset_path>\u002Factions.json \\\n  augment_config=\u003Crun_dir>\u002Fiter\u003CN>\u002Faugment_config.yaml \\\n  ddm_train_config=\u003Crun_dir>\u002Fiter\u003CN>\u002Fddm_train_config.yaml \\\n  vlm_train_config=\u003Crun_dir>\u002Fiter\u003CN>\u002Ftrain_config.toml \\\n  vlm_train_log=\u003Crun_dir>\u002Fiter\u003CN>\u002Ftraining.log \\\n  output_dir=\u003Crun_dir>\u002Fiter\u003CN> \\\n  iter=\u003CN> \\\n  success_criteria=\"e2e_seq_acc>=1.0,e2e_action_acc>=0.95,by_action_acc>=0.95,ddm_f1>=0.6\"\n",[1698],{"type":41,"tag":91,"props":1699,"children":1700},{"__ignoreMap":185},[1701],{"type":47,"value":1696},{"type":41,"tag":61,"props":1703,"children":1704},{},[1705,1710,1712,1718,1720,1726,1728,1734,1736,1742,1744,1750,1752,1758],{"type":41,"tag":67,"props":1706,"children":1707},{},[1708],{"type":47,"value":1709},"Dispatch this payload via a sub-agent",{"type":47,"value":1711}," (Agent tool) — see Step 8b for why this is mandatory (keeps the heavy RCA out of the orchestrator's context so RCA is always affordable). The sub-agent writes analysis JSONs to ",{"type":41,"tag":91,"props":1713,"children":1715},{"className":1714},[],[1716],{"type":47,"value":1717},"\u003Coutput_dir>\u002Frca_analysis\u002F",{"type":47,"value":1719}," and the report to ",{"type":41,"tag":91,"props":1721,"children":1723},{"className":1722},[],[1724],{"type":47,"value":1725},"\u003Coutput_dir>\u002Frca_report.md",{"type":47,"value":1727},", and returns ONLY the compact ",{"type":41,"tag":91,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":47,"value":1733},"RCA_RESULT:",{"type":47,"value":1735}," block (its skill's return contract). The orchestrator consumes that block — verifying ",{"type":41,"tag":91,"props":1737,"children":1739},{"className":1738},[],[1740],{"type":47,"value":1741},"RCA_RESULT.report_path",{"type":47,"value":1743}," exists and copying ",{"type":41,"tag":91,"props":1745,"children":1747},{"className":1746},[],[1748],{"type":47,"value":1749},"RCA_RESULT.typed_actions",{"type":47,"value":1751}," into ",{"type":41,"tag":91,"props":1753,"children":1755},{"className":1754},[],[1756],{"type":47,"value":1757},"rca_reports[]",{"type":47,"value":1759}," — and never needs to load the report prose.",{"type":41,"tag":138,"props":1761,"children":1763},{"id":1762},"dataset-split-auto-detection",[1764],{"type":47,"value":1765},"Dataset Split Auto-Detection",{"type":41,"tag":61,"props":1767,"children":1768},{},[1769,1771,1777,1779,1785],{"type":47,"value":1770},"If the user provides a single ",{"type":41,"tag":91,"props":1772,"children":1774},{"className":1773},[],[1775],{"type":47,"value":1776},"dataset_path",{"type":47,"value":1778}," (no explicit ",{"type":41,"tag":91,"props":1780,"children":1782},{"className":1781},[],[1783],{"type":47,"value":1784},"eval_dataset_path",{"type":47,"value":1786},"), run:",{"type":41,"tag":180,"props":1788,"children":1790},{"className":1217,"code":1789,"language":1219,"meta":185,"style":185},"python3 ${SKILL_DIR}\u002Fscripts\u002Fauto_detect_splits.py \u003Cdataset_path>\n# Success: prints TRAIN=\u003Cabs_path> and EVAL=\u003Cabs_path>\n# Failure: prints diagnostic and exits 1 — set paths explicitly in inputs.yaml\n",[1791],{"type":41,"tag":91,"props":1792,"children":1793},{"__ignoreMap":185},[1794,1841,1849],{"type":41,"tag":191,"props":1795,"children":1796},{"class":193,"line":194},[1797,1802,1807,1812,1817,1822,1826,1831,1836],{"type":41,"tag":191,"props":1798,"children":1799},{"style":1229},[1800],{"type":47,"value":1801},"python3",{"type":41,"tag":191,"props":1803,"children":1804},{"style":204},[1805],{"type":47,"value":1806}," ${",{"type":41,"tag":191,"props":1808,"children":1809},{"style":1246},[1810],{"type":47,"value":1811},"SKILL_DIR",{"type":41,"tag":191,"props":1813,"children":1814},{"style":204},[1815],{"type":47,"value":1816},"}",{"type":41,"tag":191,"props":1818,"children":1819},{"style":1240},[1820],{"type":47,"value":1821},"\u002Fscripts\u002Fauto_detect_splits.py",{"type":41,"tag":191,"props":1823,"children":1824},{"style":204},[1825],{"type":47,"value":1237},{"type":41,"tag":191,"props":1827,"children":1828},{"style":1240},[1829],{"type":47,"value":1830},"dataset_pat",{"type":41,"tag":191,"props":1832,"children":1833},{"style":1246},[1834],{"type":47,"value":1835},"h",{"type":41,"tag":191,"props":1837,"children":1838},{"style":204},[1839],{"type":47,"value":1840},">\n",{"type":41,"tag":191,"props":1842,"children":1843},{"class":193,"line":210},[1844],{"type":41,"tag":191,"props":1845,"children":1846},{"style":229},[1847],{"type":47,"value":1848},"# Success: prints TRAIN=\u003Cabs_path> and EVAL=\u003Cabs_path>\n",{"type":41,"tag":191,"props":1850,"children":1851},{"class":193,"line":235},[1852],{"type":41,"tag":191,"props":1853,"children":1854},{"style":229},[1855],{"type":47,"value":1856},"# Failure: prints diagnostic and exits 1 — set paths explicitly in inputs.yaml\n",{"type":41,"tag":61,"props":1858,"children":1859},{},[1860,1862,1868,1870,1876],{"type":47,"value":1861},"Matches ",{"type":41,"tag":91,"props":1863,"children":1865},{"className":1864},[],[1866],{"type":47,"value":1867},"\u003Cstem>_train",{"type":47,"value":1869}," ↔ ",{"type":41,"tag":91,"props":1871,"children":1873},{"className":1872},[],[1874],{"type":47,"value":1875},"\u003Cstem>_test",{"type":47,"value":1877}," pairs; fails on zero or ambiguous matches.",{"type":41,"tag":802,"props":1879,"children":1880},{},[],{"type":41,"tag":50,"props":1882,"children":1884},{"id":1883},"step-1-prerequisites",[1885],{"type":47,"value":1886},"Step 1: Prerequisites",{"type":41,"tag":61,"props":1888,"children":1889},{},[1890,1892,1898],{"type":47,"value":1891},"Run all checks from ",{"type":41,"tag":91,"props":1893,"children":1895},{"className":1894},[],[1896],{"type":47,"value":1897},"references\u002Fprerequisites.md",{"type":47,"value":1899},". Auto-fix soft issues (start services, install packages). Block on hard failures. Do not proceed until all pass.",{"type":41,"tag":802,"props":1901,"children":1902},{},[],{"type":41,"tag":50,"props":1904,"children":1906},{"id":1905},"step-2-initialize-run-state",[1907],{"type":47,"value":1908},"Step 2: Initialize Run State",{"type":41,"tag":61,"props":1910,"children":1911},{},[1912,1914,1920,1922],{"type":47,"value":1913},"Create ",{"type":41,"tag":91,"props":1915,"children":1917},{"className":1916},[],[1918],{"type":47,"value":1919},"\u003Coutput_dir>\u002Frun_\u003CYYYYMMDD_HHMMSS>\u002Frun_state.yaml",{"type":47,"value":1921},". Print path as first output line: ",{"type":41,"tag":91,"props":1923,"children":1925},{"className":1924},[],[1926],{"type":47,"value":1927},"=== RUN STATE: \u003Cfull\u002Fpath\u002Fto\u002Frun_state.yaml> ===",{"type":41,"tag":138,"props":1929,"children":1931},{"id":1930},"state-progress-files-mandatory-generated-never-hand-edited",[1932],{"type":47,"value":1933},"State + progress files (MANDATORY — generated, never hand-edited)",{"type":41,"tag":61,"props":1935,"children":1936},{},[1937,1970,1972,1978],{"type":41,"tag":67,"props":1938,"children":1939},{},[1940,1945,1947,1953,1955,1961,1962,1968],{"type":41,"tag":91,"props":1941,"children":1943},{"className":1942},[],[1944],{"type":47,"value":104},{"type":47,"value":1946}," is edited ONLY via ",{"type":41,"tag":91,"props":1948,"children":1950},{"className":1949},[],[1951],{"type":47,"value":1952},"scripts\u002Frs_update.py",{"type":47,"value":1954}," — never with ",{"type":41,"tag":91,"props":1956,"children":1958},{"className":1957},[],[1959],{"type":47,"value":1960},"sed",{"type":47,"value":655},{"type":41,"tag":91,"props":1963,"children":1965},{"className":1964},[],[1966],{"type":47,"value":1967},"str.replace()",{"type":47,"value":1969},",\nor a from-memory Edit block.",{"type":47,"value":1971}," Hand-editing a growing YAML file caused two real production bugs\n(field cross-contamination from copy-pasted entry templates, and silent no-ops when a replace\nanchor didn't byte-match). ",{"type":41,"tag":91,"props":1973,"children":1975},{"className":1974},[],[1976],{"type":47,"value":1977},"rs_update.py",{"type":47,"value":1979}," does load→mutate→dump with round-trip validation:",{"type":41,"tag":180,"props":1981,"children":1983},{"className":1217,"code":1982,"language":1219,"meta":185,"style":185},"python3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> set iteration=N phase_status.rca=done\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> append eval_history '\u003Cjson row>'\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> append rca_reports  '\u003Cjson entry>'\npython3 ${SKILL_DIR}\u002Fscripts\u002Frs_update.py \u003Crun_dir> budget --substantive +1 --rca +1\n",[1984],{"type":41,"tag":91,"props":1985,"children":1986},{"__ignoreMap":185},[1987,2043,2107,2169],{"type":41,"tag":191,"props":1988,"children":1989},{"class":193,"line":194},[1990,1994,1998,2002,2006,2011,2015,2020,2024,2028,2033,2038],{"type":41,"tag":191,"props":1991,"children":1992},{"style":1229},[1993],{"type":47,"value":1801},{"type":41,"tag":191,"props":1995,"children":1996},{"style":204},[1997],{"type":47,"value":1806},{"type":41,"tag":191,"props":1999,"children":2000},{"style":1246},[2001],{"type":47,"value":1811},{"type":41,"tag":191,"props":2003,"children":2004},{"style":204},[2005],{"type":47,"value":1816},{"type":41,"tag":191,"props":2007,"children":2008},{"style":1240},[2009],{"type":47,"value":2010},"\u002Fscripts\u002Frs_update.py",{"type":41,"tag":191,"props":2012,"children":2013},{"style":204},[2014],{"type":47,"value":1237},{"type":41,"tag":191,"props":2016,"children":2017},{"style":1240},[2018],{"type":47,"value":2019},"run_di",{"type":41,"tag":191,"props":2021,"children":2022},{"style":1246},[2023],{"type":47,"value":1249},{"type":41,"tag":191,"props":2025,"children":2026},{"style":204},[2027],{"type":47,"value":1254},{"type":41,"tag":191,"props":2029,"children":2030},{"style":1240},[2031],{"type":47,"value":2032}," set",{"type":41,"tag":191,"props":2034,"children":2035},{"style":1240},[2036],{"type":47,"value":2037}," iteration=N",{"type":41,"tag":191,"props":2039,"children":2040},{"style":1240},[2041],{"type":47,"value":2042}," phase_status.rca=done\n",{"type":41,"tag":191,"props":2044,"children":2045},{"class":193,"line":210},[2046,2050,2054,2058,2062,2066,2070,2074,2078,2082,2087,2092,2097,2102],{"type":41,"tag":191,"props":2047,"children":2048},{"style":1229},[2049],{"type":47,"value":1801},{"type":41,"tag":191,"props":2051,"children":2052},{"style":204},[2053],{"type":47,"value":1806},{"type":41,"tag":191,"props":2055,"children":2056},{"style":1246},[2057],{"type":47,"value":1811},{"type":41,"tag":191,"props":2059,"children":2060},{"style":204},[2061],{"type":47,"value":1816},{"type":41,"tag":191,"props":2063,"children":2064},{"style":1240},[2065],{"type":47,"value":2010},{"type":41,"tag":191,"props":2067,"children":2068},{"style":204},[2069],{"type":47,"value":1237},{"type":41,"tag":191,"props":2071,"children":2072},{"style":1240},[2073],{"type":47,"value":2019},{"type":41,"tag":191,"props":2075,"children":2076},{"style":1246},[2077],{"type":47,"value":1249},{"type":41,"tag":191,"props":2079,"children":2080},{"style":204},[2081],{"type":47,"value":1254},{"type":41,"tag":191,"props":2083,"children":2084},{"style":1240},[2085],{"type":47,"value":2086}," append",{"type":41,"tag":191,"props":2088,"children":2089},{"style":1240},[2090],{"type":47,"value":2091}," eval_history",{"type":41,"tag":191,"props":2093,"children":2094},{"style":204},[2095],{"type":47,"value":2096}," '",{"type":41,"tag":191,"props":2098,"children":2099},{"style":1240},[2100],{"type":47,"value":2101},"\u003Cjson row>",{"type":41,"tag":191,"props":2103,"children":2104},{"style":204},[2105],{"type":47,"value":2106},"'\n",{"type":41,"tag":191,"props":2108,"children":2109},{"class":193,"line":235},[2110,2114,2118,2122,2126,2130,2134,2138,2142,2146,2150,2155,2160,2165],{"type":41,"tag":191,"props":2111,"children":2112},{"style":1229},[2113],{"type":47,"value":1801},{"type":41,"tag":191,"props":2115,"children":2116},{"style":204},[2117],{"type":47,"value":1806},{"type":41,"tag":191,"props":2119,"children":2120},{"style":1246},[2121],{"type":47,"value":1811},{"type":41,"tag":191,"props":2123,"children":2124},{"style":204},[2125],{"type":47,"value":1816},{"type":41,"tag":191,"props":2127,"children":2128},{"style":1240},[2129],{"type":47,"value":2010},{"type":41,"tag":191,"props":2131,"children":2132},{"style":204},[2133],{"type":47,"value":1237},{"type":41,"tag":191,"props":2135,"children":2136},{"style":1240},[2137],{"type":47,"value":2019},{"type":41,"tag":191,"props":2139,"children":2140},{"style":1246},[2141],{"type":47,"value":1249},{"type":41,"tag":191,"props":2143,"children":2144},{"style":204},[2145],{"type":47,"value":1254},{"type":41,"tag":191,"props":2147,"children":2148},{"style":1240},[2149],{"type":47,"value":2086},{"type":41,"tag":191,"props":2151,"children":2152},{"style":1240},[2153],{"type":47,"value":2154}," rca_reports",{"type":41,"tag":191,"props":2156,"children":2157},{"style":204},[2158],{"type":47,"value":2159},"  '",{"type":41,"tag":191,"props":2161,"children":2162},{"style":1240},[2163],{"type":47,"value":2164},"\u003Cjson entry>",{"type":41,"tag":191,"props":2166,"children":2167},{"style":204},[2168],{"type":47,"value":2106},{"type":41,"tag":191,"props":2170,"children":2171},{"class":193,"line":258},[2172,2176,2180,2184,2188,2192,2196,2200,2204,2208,2213,2218,2223,2228],{"type":41,"tag":191,"props":2173,"children":2174},{"style":1229},[2175],{"type":47,"value":1801},{"type":41,"tag":191,"props":2177,"children":2178},{"style":204},[2179],{"type":47,"value":1806},{"type":41,"tag":191,"props":2181,"children":2182},{"style":1246},[2183],{"type":47,"value":1811},{"type":41,"tag":191,"props":2185,"children":2186},{"style":204},[2187],{"type":47,"value":1816},{"type":41,"tag":191,"props":2189,"children":2190},{"style":1240},[2191],{"type":47,"value":2010},{"type":41,"tag":191,"props":2193,"children":2194},{"style":204},[2195],{"type":47,"value":1237},{"type":41,"tag":191,"props":2197,"children":2198},{"style":1240},[2199],{"type":47,"value":2019},{"type":41,"tag":191,"props":2201,"children":2202},{"style":1246},[2203],{"type":47,"value":1249},{"type":41,"tag":191,"props":2205,"children":2206},{"style":204},[2207],{"type":47,"value":1254},{"type":41,"tag":191,"props":2209,"children":2210},{"style":1240},[2211],{"type":47,"value":2212}," budget",{"type":41,"tag":191,"props":2214,"children":2215},{"style":1240},[2216],{"type":47,"value":2217}," --substantive",{"type":41,"tag":191,"props":2219,"children":2220},{"style":1240},[2221],{"type":47,"value":2222}," +1",{"type":41,"tag":191,"props":2224,"children":2225},{"style":1240},[2226],{"type":47,"value":2227}," --rca",{"type":41,"tag":191,"props":2229,"children":2230},{"style":1240},[2231],{"type":47,"value":2232}," +1\n",{"type":41,"tag":61,"props":2234,"children":2235},{},[2236,2261,2263,2269,2271,2277],{"type":41,"tag":67,"props":2237,"children":2238},{},[2239,2245,2246,2252,2254,2259],{"type":41,"tag":91,"props":2240,"children":2242},{"className":2241},[],[2243],{"type":47,"value":2244},"progress.md",{"type":47,"value":1444},{"type":41,"tag":91,"props":2247,"children":2249},{"className":2248},[],[2250],{"type":47,"value":2251},"progress.html",{"type":47,"value":2253}," are GENERATED from ",{"type":41,"tag":91,"props":2255,"children":2257},{"className":2256},[],[2258],{"type":47,"value":104},{"type":47,"value":2260}," — never authored by hand.",{"type":47,"value":2262},"\nThey are a pure projection of ",{"type":41,"tag":91,"props":2264,"children":2266},{"className":2265},[],[2267],{"type":47,"value":2268},"eval_history",{"type":47,"value":2270}," + ",{"type":41,"tag":91,"props":2272,"children":2274},{"className":2273},[],[2275],{"type":47,"value":2276},"phase_status",{"type":47,"value":2278},", so they cannot drift behind the real\nstate. Regenerate BOTH after every eval (Step 7c) and at Step 2 init:",{"type":41,"tag":180,"props":2280,"children":2282},{"className":1217,"code":2281,"language":1219,"meta":185,"style":185},"python3 ${SKILL_DIR}\u002Fscripts\u002Fgen_progress.py \u003Crun_dir>\n# prints: === PROGRESS (local file): \u003Crun_dir>\u002Fprogress.md ===  (and progress.html)\n",[2283],{"type":41,"tag":91,"props":2284,"children":2285},{"__ignoreMap":185},[2286,2326],{"type":41,"tag":191,"props":2287,"children":2288},{"class":193,"line":194},[2289,2293,2297,2301,2305,2310,2314,2318,2322],{"type":41,"tag":191,"props":2290,"children":2291},{"style":1229},[2292],{"type":47,"value":1801},{"type":41,"tag":191,"props":2294,"children":2295},{"style":204},[2296],{"type":47,"value":1806},{"type":41,"tag":191,"props":2298,"children":2299},{"style":1246},[2300],{"type":47,"value":1811},{"type":41,"tag":191,"props":2302,"children":2303},{"style":204},[2304],{"type":47,"value":1816},{"type":41,"tag":191,"props":2306,"children":2307},{"style":1240},[2308],{"type":47,"value":2309},"\u002Fscripts\u002Fgen_progress.py",{"type":41,"tag":191,"props":2311,"children":2312},{"style":204},[2313],{"type":47,"value":1237},{"type":41,"tag":191,"props":2315,"children":2316},{"style":1240},[2317],{"type":47,"value":2019},{"type":41,"tag":191,"props":2319,"children":2320},{"style":1246},[2321],{"type":47,"value":1249},{"type":41,"tag":191,"props":2323,"children":2324},{"style":204},[2325],{"type":47,"value":1840},{"type":41,"tag":191,"props":2327,"children":2328},{"class":193,"line":210},[2329],{"type":41,"tag":191,"props":2330,"children":2331},{"style":229},[2332],{"type":47,"value":2333},"# prints: === PROGRESS (local file): \u003Crun_dir>\u002Fprogress.md ===  (and progress.html)\n",{"type":41,"tag":61,"props":2335,"children":2336},{},[2337,2339,2345,2347,2353],{"type":47,"value":2338},"(For richer chart annotations, eval_history rows may carry an optional ",{"type":41,"tag":91,"props":2340,"children":2342},{"className":2341},[],[2343],{"type":47,"value":2344},"chart",{"type":47,"value":2346}," sub-dict:\n",{"type":41,"tag":91,"props":2348,"children":2350},{"className":2349},[],[2351],{"type":47,"value":2352},"{ph, t, lr, samp, qas}",{"type":47,"value":2354}," — gen_progress.py reads it; absence is fine.)",{"type":41,"tag":61,"props":2356,"children":2357},{},[2358,2360,2366,2368,2373,2375,2381],{"type":47,"value":2359},"Both files + the canonical run_state are what the Step 8a.0 gate asserts are current — not optional.\n",{"type":41,"tag":91,"props":2361,"children":2363},{"className":2362},[],[2364],{"type":47,"value":2365},"gen_progress.py",{"type":47,"value":2367},"\u002F",{"type":41,"tag":91,"props":2369,"children":2371},{"className":2370},[],[2372],{"type":47,"value":1977},{"type":47,"value":2374}," also refresh ",{"type":41,"tag":91,"props":2376,"children":2378},{"className":2377},[],[2379],{"type":47,"value":2380},"~\u002F.cache\u002Fsop-ft-orchestrate\u002Factive_run",{"type":47,"value":2382}," so the\nharness gate can locate this run_dir even though it lives outside the harness cwd.",{"type":41,"tag":61,"props":2384,"children":2385},{},[2386,2388,2393],{"type":47,"value":2387},"Initialize from ",{"type":41,"tag":91,"props":2389,"children":2391},{"className":2390},[],[2392],{"type":47,"value":1111},{"type":47,"value":2394},". Invariants:",{"type":41,"tag":78,"props":2396,"children":2397},{},[2398,2419,2446],{"type":41,"tag":82,"props":2399,"children":2400},{},[2401,2410,2412,2418],{"type":41,"tag":67,"props":2402,"children":2403},{},[2404],{"type":41,"tag":91,"props":2405,"children":2407},{"className":2406},[],[2408],{"type":47,"value":2409},"eval_vision_params",{"type":47,"value":2411}," — re-populate after every VLM training run; must match ",{"type":41,"tag":91,"props":2413,"children":2415},{"className":2414},[],[2416],{"type":47,"value":2417},"train_config.toml [custom.vision]",{"type":47,"value":136},{"type":41,"tag":82,"props":2420,"children":2421},{},[2422,2430,2432,2437,2439,2444],{"type":41,"tag":67,"props":2423,"children":2424},{},[2425],{"type":41,"tag":91,"props":2426,"children":2428},{"className":2427},[],[2429],{"type":47,"value":2276},{"type":47,"value":2431}," — ",{"type":41,"tag":91,"props":2433,"children":2435},{"className":2434},[],[2436],{"type":47,"value":1347},{"type":47,"value":2438}," BEFORE delegating; ",{"type":41,"tag":91,"props":2440,"children":2442},{"className":2441},[],[2443],{"type":47,"value":1339},{"type":47,"value":2445}," AFTER.",{"type":41,"tag":82,"props":2447,"children":2448},{},[2449,2458],{"type":41,"tag":67,"props":2450,"children":2451},{},[2452],{"type":41,"tag":91,"props":2453,"children":2455},{"className":2454},[],[2456],{"type":47,"value":2457},"rca_reports",{"type":47,"value":2459}," — every failed iteration must have an entry.",{"type":41,"tag":802,"props":2461,"children":2462},{},[],{"type":41,"tag":50,"props":2464,"children":2466},{"id":2465},"step-3-phase-1-import-dataset-run-once",[2467],{"type":47,"value":2468},"Step 3: Phase 1 — Import Dataset (run once)",{"type":41,"tag":61,"props":2470,"children":2471},{},[2472,2474],{"type":47,"value":2473},"Check: ",{"type":41,"tag":91,"props":2475,"children":2477},{"className":2476},[],[2478],{"type":47,"value":2479},"curl -s http:\u002F\u002Flocalhost:8100\u002Fapi\u002Fv1\u002Fdatasets | python3 -c \"import json,sys; d=json.load(sys.stdin); print([x['id'] for x in d.get('datasets',[])])\"",{"type":41,"tag":61,"props":2481,"children":2482},{},[2483,2485,2491,2493,2499],{"type":47,"value":2484},"If not imported: copy dataset to ",{"type":41,"tag":91,"props":2486,"children":2488},{"className":2487},[],[2489],{"type":47,"value":2490},"\u003Ctraining_bp_root>\u002Fassets\u002Fdata\u002F",{"type":47,"value":2492},", then ",{"type":41,"tag":91,"props":2494,"children":2496},{"className":2495},[],[2497],{"type":47,"value":2498},"bash ${SKILL_DIR}\u002Fscripts\u002Fimport_dataset.sh \u003Cdataset_id>",{"type":47,"value":2500},". Verify counts.",{"type":41,"tag":78,"props":2502,"children":2503},{},[2504,2509],{"type":41,"tag":82,"props":2505,"children":2506},{},[2507],{"type":47,"value":2508},"Do NOT re-import on subsequent iterations.",{"type":41,"tag":82,"props":2510,"children":2511},{},[2512],{"type":47,"value":2513},"Do import every dataset provided, including training and validation",{"type":41,"tag":802,"props":2515,"children":2516},{},[],{"type":41,"tag":50,"props":2518,"children":2520},{"id":2519},"step-4-phase-2-data-augmentation-run-iter-1-on-augment-config-change",[2521,2523],{"type":47,"value":2522},"Step 4: Phase 2 — Data Augmentation ",{"type":41,"tag":1453,"props":2524,"children":2525},{},[2526],{"type":47,"value":2527},"(run iter 1 + on augment-config-change)",{"type":41,"tag":61,"props":2529,"children":2530},{},[2531,2533,2539],{"type":47,"value":2532},"Increment ",{"type":41,"tag":91,"props":2534,"children":2536},{"className":2535},[],[2537],{"type":47,"value":2538},"augmented_dataset_id",{"type":47,"value":2540}," suffix; apply RCA augmentation config changes.",{"type":41,"tag":61,"props":2542,"children":2543},{},[2544],{"type":47,"value":2545},"GQAs backend (priority order):",{"type":41,"tag":61,"props":2547,"children":2548},{},[2549,2562,2564,2570],{"type":41,"tag":67,"props":2550,"children":2551},{},[2552,2554,2560],{"type":47,"value":2553},"Check for ",{"type":41,"tag":91,"props":2555,"children":2557},{"className":2556},[],[2558],{"type":47,"value":2559},"ANTHROPIC_API_KEY",{"type":47,"value":2561}," (HIGHEST PRIORITY):",{"type":47,"value":2563}," if set → use Claude (preferred: no GPU, ~10× faster). Set in ",{"type":41,"tag":91,"props":2565,"children":2567},{"className":2566},[],[2568],{"type":47,"value":2569},"augment_config.yaml",{"type":47,"value":178},{"type":41,"tag":180,"props":2572,"children":2574},{"className":182,"code":2573,"language":184,"meta":185,"style":185},"gqas:\n  enable: true\n  llm_type: \"local\"         # argparse only accepts \"local\" or \"nvidia\"; routing is by model name\n  llm: claude-haiku-4-5-20251001   # detected as Claude by the override; use haiku for speed\u002Fcost\n  local_llm_url: \"\"         # not used for Claude routing\n  enable_thinking: \"false\"\n  num_qa_llm: 8\n  num_qa_per_chunk: 2\n",[2575],{"type":41,"tag":91,"props":2576,"children":2577},{"__ignoreMap":185},[2578,2590,2608,2640,2662,2684,2710,2727],{"type":41,"tag":191,"props":2579,"children":2580},{"class":193,"line":194},[2581,2586],{"type":41,"tag":191,"props":2582,"children":2583},{"style":198},[2584],{"type":47,"value":2585},"gqas",{"type":41,"tag":191,"props":2587,"children":2588},{"style":204},[2589],{"type":47,"value":207},{"type":41,"tag":191,"props":2591,"children":2592},{"class":193,"line":210},[2593,2598,2602],{"type":41,"tag":191,"props":2594,"children":2595},{"style":198},[2596],{"type":47,"value":2597},"  enable",{"type":41,"tag":191,"props":2599,"children":2600},{"style":204},[2601],{"type":47,"value":178},{"type":41,"tag":191,"props":2603,"children":2605},{"style":2604},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2606],{"type":47,"value":2607}," true\n",{"type":41,"tag":191,"props":2609,"children":2610},{"class":193,"line":235},[2611,2616,2620,2625,2630,2635],{"type":41,"tag":191,"props":2612,"children":2613},{"style":198},[2614],{"type":47,"value":2615},"  llm_type",{"type":41,"tag":191,"props":2617,"children":2618},{"style":204},[2619],{"type":47,"value":178},{"type":41,"tag":191,"props":2621,"children":2622},{"style":204},[2623],{"type":47,"value":2624}," \"",{"type":41,"tag":191,"props":2626,"children":2627},{"style":1240},[2628],{"type":47,"value":2629},"local",{"type":41,"tag":191,"props":2631,"children":2632},{"style":204},[2633],{"type":47,"value":2634},"\"",{"type":41,"tag":191,"props":2636,"children":2637},{"style":229},[2638],{"type":47,"value":2639},"         # argparse only accepts \"local\" or \"nvidia\"; routing is by model name\n",{"type":41,"tag":191,"props":2641,"children":2642},{"class":193,"line":258},[2643,2648,2652,2657],{"type":41,"tag":191,"props":2644,"children":2645},{"style":198},[2646],{"type":47,"value":2647},"  llm",{"type":41,"tag":191,"props":2649,"children":2650},{"style":204},[2651],{"type":47,"value":178},{"type":41,"tag":191,"props":2653,"children":2654},{"style":1240},[2655],{"type":47,"value":2656}," claude-haiku-4-5-20251001",{"type":41,"tag":191,"props":2658,"children":2659},{"style":229},[2660],{"type":47,"value":2661},"   # detected as Claude by the override; use haiku for speed\u002Fcost\n",{"type":41,"tag":191,"props":2663,"children":2664},{"class":193,"line":280},[2665,2670,2674,2679],{"type":41,"tag":191,"props":2666,"children":2667},{"style":198},[2668],{"type":47,"value":2669},"  local_llm_url",{"type":41,"tag":191,"props":2671,"children":2672},{"style":204},[2673],{"type":47,"value":178},{"type":41,"tag":191,"props":2675,"children":2676},{"style":204},[2677],{"type":47,"value":2678}," \"\"",{"type":41,"tag":191,"props":2680,"children":2681},{"style":229},[2682],{"type":47,"value":2683},"         # not used for Claude routing\n",{"type":41,"tag":191,"props":2685,"children":2686},{"class":193,"line":302},[2687,2692,2696,2700,2705],{"type":41,"tag":191,"props":2688,"children":2689},{"style":198},[2690],{"type":47,"value":2691},"  enable_thinking",{"type":41,"tag":191,"props":2693,"children":2694},{"style":204},[2695],{"type":47,"value":178},{"type":41,"tag":191,"props":2697,"children":2698},{"style":204},[2699],{"type":47,"value":2624},{"type":41,"tag":191,"props":2701,"children":2702},{"style":1240},[2703],{"type":47,"value":2704},"false",{"type":41,"tag":191,"props":2706,"children":2707},{"style":204},[2708],{"type":47,"value":2709},"\"\n",{"type":41,"tag":191,"props":2711,"children":2712},{"class":193,"line":324},[2713,2718,2722],{"type":41,"tag":191,"props":2714,"children":2715},{"style":198},[2716],{"type":47,"value":2717},"  num_qa_llm",{"type":41,"tag":191,"props":2719,"children":2720},{"style":204},[2721],{"type":47,"value":178},{"type":41,"tag":191,"props":2723,"children":2724},{"style":223},[2725],{"type":47,"value":2726}," 8\n",{"type":41,"tag":191,"props":2728,"children":2729},{"class":193,"line":342},[2730,2735,2739],{"type":41,"tag":191,"props":2731,"children":2732},{"style":198},[2733],{"type":47,"value":2734},"  num_qa_per_chunk",{"type":41,"tag":191,"props":2736,"children":2737},{"style":204},[2738],{"type":47,"value":178},{"type":41,"tag":191,"props":2740,"children":2741},{"style":223},[2742],{"type":47,"value":2743}," 2\n",{"type":41,"tag":61,"props":2745,"children":2746},{},[2747,2749,2754],{"type":47,"value":2748},"Setup: ",{"type":41,"tag":91,"props":2750,"children":2752},{"className":2751},[],[2753],{"type":47,"value":1133},{"type":47,"value":136},{"type":41,"tag":61,"props":2756,"children":2757},{},[2758,2763,2765,2771,2773,2779],{"type":41,"tag":67,"props":2759,"children":2760},{},[2761],{"type":47,"value":2762},"Fallback: NIM:",{"type":47,"value":2764}," valid ",{"type":41,"tag":91,"props":2766,"children":2768},{"className":2767},[],[2769],{"type":47,"value":2770},"NGC_API_KEY",{"type":47,"value":2772}," → ",{"type":41,"tag":91,"props":2774,"children":2776},{"className":2775},[],[2777],{"type":47,"value":2778},"llm_type: \"nvidia\"",{"type":47,"value":2780},". After 429 for >5 min → local.",{"type":41,"tag":61,"props":2782,"children":2783},{},[2784,2789,2791,2797,2799,2805,2807,2812,2814,2820,2822,2828,2830,2835],{"type":41,"tag":67,"props":2785,"children":2786},{},[2787],{"type":47,"value":2788},"Fallback: local:",{"type":47,"value":2790}," vLLM container ",{"type":41,"tag":91,"props":2792,"children":2794},{"className":2793},[],[2795],{"type":47,"value":2796},"vllm\u002Fvllm-openai@sha256:2e08b462bb444a6da8a84a533f09024c61617574e67386efe4a723a0633fcc6a",{"type":47,"value":2798}," with ",{"type":41,"tag":91,"props":2800,"children":2802},{"className":2801},[],[2803],{"type":47,"value":2804},"Qwen\u002FQwen3-8B",{"type":47,"value":2806}," (",{"type":41,"tag":67,"props":2808,"children":2809},{},[2810],{"type":47,"value":2811},"no",{"type":47,"value":2813}," ",{"type":41,"tag":91,"props":2815,"children":2817},{"className":2816},[],[2818],{"type":47,"value":2819},"--reasoning-parser qwen3",{"type":47,"value":2821},"). Stop server after augment. Alt: ",{"type":41,"tag":91,"props":2823,"children":2825},{"className":2824},[],[2826],{"type":47,"value":2827},"Qwen\u002FQwen3.5-27B",{"type":47,"value":2829}," (requires ",{"type":41,"tag":91,"props":2831,"children":2833},{"className":2832},[],[2834],{"type":47,"value":2819},{"type":47,"value":2836},").",{"type":41,"tag":78,"props":2838,"children":2839},{},[2840],{"type":41,"tag":82,"props":2841,"children":2842},{},[2843,2848,2850,2856],{"type":41,"tag":67,"props":2844,"children":2845},{},[2846],{"type":47,"value":2847},"Never disable GQAs.",{"type":47,"value":2849}," Fix start failures; do not set ",{"type":41,"tag":91,"props":2851,"children":2853},{"className":2852},[],[2854],{"type":47,"value":2855},"enable: false",{"type":47,"value":136},{"type":41,"tag":138,"props":2858,"children":2860},{"id":2859},"gqas-pre-flight-local-vllm-only",[2861],{"type":47,"value":2862},"GQAs Pre-flight (local vLLM only)",{"type":41,"tag":61,"props":2864,"children":2865},{},[2866,2868,2873],{"type":47,"value":2867},"Complete all three steps in ",{"type":41,"tag":91,"props":2869,"children":2871},{"className":2870},[],[2872],{"type":47,"value":1122},{"type":47,"value":2874}," before augmenting: launch, probe-validate, post-augmentation output check.",{"type":41,"tag":61,"props":2876,"children":2877},{},[2878,2880,2886,2887,2892,2893],{"type":47,"value":2879},"Write ",{"type":41,"tag":91,"props":2881,"children":2883},{"className":2882},[],[2884],{"type":47,"value":2885},"phase_status.augment: in_progress",{"type":47,"value":1558},{"type":41,"tag":91,"props":2888,"children":2890},{"className":2889},[],[2891],{"type":47,"value":104},{"type":47,"value":2492},{"type":41,"tag":67,"props":2894,"children":2895},{},[2896,2898,2904],{"type":47,"value":2897},"delegate to ",{"type":41,"tag":91,"props":2899,"children":2901},{"className":2900},[],[2902],{"type":47,"value":2903},"\u002Fsop-data-augmentation",{"type":47,"value":136},{"type":41,"tag":61,"props":2906,"children":2907},{},[2908,2910,2915,2917,2922,2923,2929],{"type":47,"value":2909},"On success: run Step 3 output check from ",{"type":41,"tag":91,"props":2911,"children":2913},{"className":2912},[],[2914],{"type":47,"value":1122},{"type":47,"value":2916},"; write ",{"type":41,"tag":91,"props":2918,"children":2920},{"className":2919},[],[2921],{"type":47,"value":2538},{"type":47,"value":1444},{"type":41,"tag":91,"props":2924,"children":2926},{"className":2925},[],[2927],{"type":47,"value":2928},"phase_status.augment: done",{"type":47,"value":136},{"type":41,"tag":61,"props":2931,"children":2932},{},[2933],{"type":47,"value":2934},"On failure: diagnose and fix; Do not skip GQAs unless genuinely unresolvable.",{"type":41,"tag":61,"props":2936,"children":2937},{},[2938,2940,2946,2948,2954],{"type":47,"value":2939},"Keep 2 newest ",{"type":41,"tag":91,"props":2941,"children":2943},{"className":2942},[],[2944],{"type":47,"value":2945},"\u003Clabel_data_id>_augmented_*\u002F",{"type":47,"value":2947}," dirs. Via ",{"type":41,"tag":91,"props":2949,"children":2951},{"className":2950},[],[2952],{"type":47,"value":2953},"docker exec \u003Cdata_gen_container>",{"type":47,"value":178},{"type":41,"tag":180,"props":2956,"children":2958},{"className":1217,"code":2957,"language":1219,"meta":185,"style":185},"docker exec \u003Cdata_gen_container> bash -c \\\n  \"ls -dt \u002Fworkspace\u002Fassets\u002Fdata\u002F\u003Clabel_data_id>_augmented_*\u002F 2>\u002Fdev\u002Fnull | tail -n +3 | xargs -r rm -rf\"\n",[2959],{"type":41,"tag":91,"props":2960,"children":2961},{"__ignoreMap":185},[2962,3007],{"type":41,"tag":191,"props":2963,"children":2964},{"class":193,"line":194},[2965,2970,2975,2979,2984,2988,2992,2997,3002],{"type":41,"tag":191,"props":2966,"children":2967},{"style":1229},[2968],{"type":47,"value":2969},"docker",{"type":41,"tag":191,"props":2971,"children":2972},{"style":1240},[2973],{"type":47,"value":2974}," exec",{"type":41,"tag":191,"props":2976,"children":2977},{"style":204},[2978],{"type":47,"value":1237},{"type":41,"tag":191,"props":2980,"children":2981},{"style":1240},[2982],{"type":47,"value":2983},"data_gen_containe",{"type":41,"tag":191,"props":2985,"children":2986},{"style":1246},[2987],{"type":47,"value":1249},{"type":41,"tag":191,"props":2989,"children":2990},{"style":204},[2991],{"type":47,"value":1254},{"type":41,"tag":191,"props":2993,"children":2994},{"style":1240},[2995],{"type":47,"value":2996}," bash",{"type":41,"tag":191,"props":2998,"children":2999},{"style":1240},[3000],{"type":47,"value":3001}," -c",{"type":41,"tag":191,"props":3003,"children":3004},{"style":1246},[3005],{"type":47,"value":3006}," \\\n",{"type":41,"tag":191,"props":3008,"children":3009},{"class":193,"line":210},[3010,3015,3020],{"type":41,"tag":191,"props":3011,"children":3012},{"style":204},[3013],{"type":47,"value":3014},"  \"",{"type":41,"tag":191,"props":3016,"children":3017},{"style":1240},[3018],{"type":47,"value":3019},"ls -dt \u002Fworkspace\u002Fassets\u002Fdata\u002F\u003Clabel_data_id>_augmented_*\u002F 2>\u002Fdev\u002Fnull | tail -n +3 | xargs -r rm -rf",{"type":41,"tag":191,"props":3021,"children":3022},{"style":204},[3023],{"type":47,"value":2709},{"type":41,"tag":802,"props":3025,"children":3026},{},[],{"type":41,"tag":50,"props":3028,"children":3030},{"id":3029},"step-5-phase-3-ddm-training-run-iter-1-on-ddm-training-config-change",[3031,3033],{"type":47,"value":3032},"Step 5: Phase 3 — DDM Training ",{"type":41,"tag":1453,"props":3034,"children":3035},{},[3036],{"type":47,"value":3037},"(run iter 1 + on DDM training-config-change)",{"type":41,"tag":61,"props":3039,"children":3040},{},[3041,3043,3049,3051,3057],{"type":47,"value":3042},"Set: ",{"type":41,"tag":91,"props":3044,"children":3046},{"className":3045},[],[3047],{"type":47,"value":3048},"num_gpus",{"type":47,"value":3050}," = GPUs detected; ",{"type":41,"tag":91,"props":3052,"children":3054},{"className":3053},[],[3055],{"type":47,"value":3056},"batch_size",{"type":47,"value":3058},": \u003C 25 GB → 4, \u003C 50 GB → 16, else → 32.",{"type":41,"tag":61,"props":3060,"children":3061},{},[3062,3064,3070],{"type":47,"value":3063},"Re-run: apply RCA changes; increment ",{"type":41,"tag":91,"props":3065,"children":3067},{"className":3066},[],[3068],{"type":47,"value":3069},"ddm_config_version",{"type":47,"value":136},{"type":41,"tag":61,"props":3072,"children":3073},{},[3074],{"type":41,"tag":67,"props":3075,"children":3076},{},[3077,3079,3085],{"type":47,"value":3078},"DDM resize augmentation policy (overrides ",{"type":41,"tag":91,"props":3080,"children":3082},{"className":3081},[],[3083],{"type":47,"value":3084},"\u002Fsop-rca-plugin:sop-rca",{"type":47,"value":3086}," Pattern 10):",{"type":41,"tag":61,"props":3088,"children":3089},{},[3090,3092,3103],{"type":47,"value":3091},"When RandomResize is recommended: ",{"type":41,"tag":67,"props":3093,"children":3094},{},[3095,3097],{"type":47,"value":3096},"never use ",{"type":41,"tag":91,"props":3098,"children":3100},{"className":3099},[],[3101],{"type":47,"value":3102},"[bilinear, bicubic, nearest]",{"type":47,"value":3104}," on datasets \u003C 20 videos. Use one option at a time:",{"type":41,"tag":78,"props":3106,"children":3107},{},[3108,3119],{"type":41,"tag":82,"props":3109,"children":3110},{},[3111,3117],{"type":41,"tag":91,"props":3112,"children":3114},{"className":3113},[],[3115],{"type":47,"value":3116},"interpolation: [nearest]",{"type":47,"value":3118}," — try first; strongest encoding-robustness signal",{"type":41,"tag":82,"props":3120,"children":3121},{},[3122,3128],{"type":41,"tag":91,"props":3123,"children":3125},{"className":3124},[],[3126],{"type":47,"value":3127},"interpolation: [bilinear]",{"type":47,"value":3129}," — fallback if convergence too slow (loss not decreasing after 10 epochs)",{"type":41,"tag":61,"props":3131,"children":3132},{},[3133],{"type":47,"value":3134},"If neither improves E2E F1, disable RandomResize.",{"type":41,"tag":61,"props":3136,"children":3137},{},[3138,3139,3145,3146,3172],{"type":47,"value":2879},{"type":41,"tag":91,"props":3140,"children":3142},{"className":3141},[],[3143],{"type":47,"value":3144},"phase_status.ddm_train: in_progress",{"type":47,"value":2492},{"type":41,"tag":67,"props":3147,"children":3148},{},[3149,3150,3156,3157,3163,3164,3170],{"type":47,"value":2897},{"type":41,"tag":91,"props":3151,"children":3153},{"className":3152},[],[3154],{"type":47,"value":3155},"\u002Fsop-ddm-finetuning",{"type":47,"value":2798},{"type":41,"tag":91,"props":3158,"children":3160},{"className":3159},[],[3161],{"type":47,"value":3162},"\u003Cdataset_id>",{"type":47,"value":1444},{"type":41,"tag":91,"props":3165,"children":3167},{"className":3166},[],[3168],{"type":47,"value":3169},"\u003Cvalidation_dataset_id>",{"type":47,"value":3171}," (if available)",{"type":47,"value":136},{"type":41,"tag":61,"props":3174,"children":3175},{},[3176,3178,3184,3185,3191,3192,3198,3199,3205,3207,3213],{"type":47,"value":3177},"On completion: record ",{"type":41,"tag":91,"props":3179,"children":3181},{"className":3180},[],[3182],{"type":47,"value":3183},"ddm_job_id",{"type":47,"value":655},{"type":41,"tag":91,"props":3186,"children":3188},{"className":3187},[],[3189],{"type":47,"value":3190},"ddm_checkpoint",{"type":47,"value":655},{"type":41,"tag":91,"props":3193,"children":3195},{"className":3194},[],[3196],{"type":47,"value":3197},"ddm_best_f1",{"type":47,"value":655},{"type":41,"tag":91,"props":3200,"children":3202},{"className":3201},[],[3203],{"type":47,"value":3204},"ddm_best_loss",{"type":47,"value":3206},". Write ",{"type":41,"tag":91,"props":3208,"children":3210},{"className":3209},[],[3211],{"type":47,"value":3212},"phase_status.ddm_train: done",{"type":47,"value":136},{"type":41,"tag":61,"props":3215,"children":3216},{},[3217,3219,3225,3227,3233,3235,3241],{"type":47,"value":3218},"Keep top-3 epoch ckpts by F1; delete rest + ",{"type":41,"tag":91,"props":3220,"children":3222},{"className":3221},[],[3223],{"type":47,"value":3224},"last.ckpt",{"type":47,"value":3226},"; delete stale ",{"type":41,"tag":91,"props":3228,"children":3230},{"className":3229},[],[3231],{"type":47,"value":3232},"ddm_inference*.ckpt",{"type":47,"value":3234},". Via ",{"type":41,"tag":91,"props":3236,"children":3238},{"className":3237},[],[3239],{"type":47,"value":3240},"docker exec \u003Cddm_container>",{"type":47,"value":178},{"type":41,"tag":180,"props":3243,"children":3245},{"className":1217,"code":3244,"language":1219,"meta":185,"style":185},"docker exec \u003Cddm_container> bash -c \"\n  ls \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Fepoch_epoch=*-val*.ckpt 2>\u002Fdev\u002Fnull \\\n    | sort -t= -k2 -rn | tail -n +4 | xargs -r rm -f\n  ls \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Fepoch_epoch=*-val*.ckpt 2>\u002Fdev\u002Fnull \\\n    | grep -q . && rm -f \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Flast.ckpt\n  find \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F -name 'ddm_inference*.ckpt' | sort | head -n -1 | xargs -r rm -f\n\"\n",[3246],{"type":41,"tag":91,"props":3247,"children":3248},{"__ignoreMap":185},[3249,3290,3303,3311,3322,3330,3338],{"type":41,"tag":191,"props":3250,"children":3251},{"class":193,"line":194},[3252,3256,3260,3264,3269,3273,3277,3281,3285],{"type":41,"tag":191,"props":3253,"children":3254},{"style":1229},[3255],{"type":47,"value":2969},{"type":41,"tag":191,"props":3257,"children":3258},{"style":1240},[3259],{"type":47,"value":2974},{"type":41,"tag":191,"props":3261,"children":3262},{"style":204},[3263],{"type":47,"value":1237},{"type":41,"tag":191,"props":3265,"children":3266},{"style":1240},[3267],{"type":47,"value":3268},"ddm_containe",{"type":41,"tag":191,"props":3270,"children":3271},{"style":1246},[3272],{"type":47,"value":1249},{"type":41,"tag":191,"props":3274,"children":3275},{"style":204},[3276],{"type":47,"value":1254},{"type":41,"tag":191,"props":3278,"children":3279},{"style":1240},[3280],{"type":47,"value":2996},{"type":41,"tag":191,"props":3282,"children":3283},{"style":1240},[3284],{"type":47,"value":3001},{"type":41,"tag":191,"props":3286,"children":3287},{"style":204},[3288],{"type":47,"value":3289}," \"\n",{"type":41,"tag":191,"props":3291,"children":3292},{"class":193,"line":210},[3293,3298],{"type":41,"tag":191,"props":3294,"children":3295},{"style":1240},[3296],{"type":47,"value":3297},"  ls \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Fepoch_epoch=*-val*.ckpt 2>\u002Fdev\u002Fnull ",{"type":41,"tag":191,"props":3299,"children":3300},{"style":1246},[3301],{"type":47,"value":3302},"\\\n",{"type":41,"tag":191,"props":3304,"children":3305},{"class":193,"line":235},[3306],{"type":41,"tag":191,"props":3307,"children":3308},{"style":1240},[3309],{"type":47,"value":3310},"    | sort -t= -k2 -rn | tail -n +4 | xargs -r rm -f\n",{"type":41,"tag":191,"props":3312,"children":3313},{"class":193,"line":258},[3314,3318],{"type":41,"tag":191,"props":3315,"children":3316},{"style":1240},[3317],{"type":47,"value":3297},{"type":41,"tag":191,"props":3319,"children":3320},{"style":1246},[3321],{"type":47,"value":3302},{"type":41,"tag":191,"props":3323,"children":3324},{"class":193,"line":280},[3325],{"type":41,"tag":191,"props":3326,"children":3327},{"style":1240},[3328],{"type":47,"value":3329},"    | grep -q . && rm -f \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F\u003Cjob_id>\u002Ftrain\u002F\u003Cjob_id>\u002Flast.ckpt\n",{"type":41,"tag":191,"props":3331,"children":3332},{"class":193,"line":302},[3333],{"type":41,"tag":191,"props":3334,"children":3335},{"style":1240},[3336],{"type":47,"value":3337},"  find \u002Fworkspace\u002Fsop-ddm-ftms\u002Fassets\u002Fresults\u002F -name 'ddm_inference*.ckpt' | sort | head -n -1 | xargs -r rm -f\n",{"type":41,"tag":191,"props":3339,"children":3340},{"class":193,"line":324},[3341],{"type":41,"tag":191,"props":3342,"children":3343},{"style":204},[3344],{"type":47,"value":2709},{"type":41,"tag":61,"props":3346,"children":3347},{},[3348,3350,3356],{"type":47,"value":3349},"Note: If best val\u002FF1 \u003C 0.5, log a ",{"type":41,"tag":91,"props":3351,"children":3353},{"className":3352},[],[3354],{"type":47,"value":3355},"manual",{"type":47,"value":3357}," note. Do NOT stop — continue evaluating.",{"type":41,"tag":138,"props":3359,"children":3361},{"id":3360},"ddm-training-watchdog",[3362],{"type":47,"value":3363},"DDM Training Watchdog",{"type":41,"tag":180,"props":3365,"children":3367},{"className":1217,"code":3366,"language":1219,"meta":185,"style":185},"bash ${SKILL_DIR}\u002Fscripts\u002Fwatch_api_job.sh \\\n  DDM \u003CDDM_BASE_URL> \u003CJOB_ID> \u003CLOG_PATH> \u003CTIMEOUT> 60 \\\n  >> \u003Crun_dir>\u002Fwatchdog_ddm.log 2>&1\n",[3368],{"type":41,"tag":91,"props":3369,"children":3370},{"__ignoreMap":185},[3371,3399,3488],{"type":41,"tag":191,"props":3372,"children":3373},{"class":193,"line":194},[3374,3378,3382,3386,3390,3395],{"type":41,"tag":191,"props":3375,"children":3376},{"style":1229},[3377],{"type":47,"value":1219},{"type":41,"tag":191,"props":3379,"children":3380},{"style":204},[3381],{"type":47,"value":1806},{"type":41,"tag":191,"props":3383,"children":3384},{"style":1246},[3385],{"type":47,"value":1811},{"type":41,"tag":191,"props":3387,"children":3388},{"style":204},[3389],{"type":47,"value":1816},{"type":41,"tag":191,"props":3391,"children":3392},{"style":1240},[3393],{"type":47,"value":3394},"\u002Fscripts\u002Fwatch_api_job.sh",{"type":41,"tag":191,"props":3396,"children":3397},{"style":1246},[3398],{"type":47,"value":3006},{"type":41,"tag":191,"props":3400,"children":3401},{"class":193,"line":210},[3402,3407,3411,3416,3421,3425,3429,3434,3439,3443,3447,3452,3457,3461,3465,3470,3475,3479,3484],{"type":41,"tag":191,"props":3403,"children":3404},{"style":1240},[3405],{"type":47,"value":3406},"  DDM",{"type":41,"tag":191,"props":3408,"children":3409},{"style":204},[3410],{"type":47,"value":1237},{"type":41,"tag":191,"props":3412,"children":3413},{"style":1240},[3414],{"type":47,"value":3415},"DDM_BASE_UR",{"type":41,"tag":191,"props":3417,"children":3418},{"style":1246},[3419],{"type":47,"value":3420},"L",{"type":41,"tag":191,"props":3422,"children":3423},{"style":204},[3424],{"type":47,"value":1254},{"type":41,"tag":191,"props":3426,"children":3427},{"style":204},[3428],{"type":47,"value":1237},{"type":41,"tag":191,"props":3430,"children":3431},{"style":1240},[3432],{"type":47,"value":3433},"JOB_I",{"type":41,"tag":191,"props":3435,"children":3436},{"style":1246},[3437],{"type":47,"value":3438},"D",{"type":41,"tag":191,"props":3440,"children":3441},{"style":204},[3442],{"type":47,"value":1254},{"type":41,"tag":191,"props":3444,"children":3445},{"style":204},[3446],{"type":47,"value":1237},{"type":41,"tag":191,"props":3448,"children":3449},{"style":1240},[3450],{"type":47,"value":3451},"LOG_PAT",{"type":41,"tag":191,"props":3453,"children":3454},{"style":1246},[3455],{"type":47,"value":3456},"H",{"type":41,"tag":191,"props":3458,"children":3459},{"style":204},[3460],{"type":47,"value":1254},{"type":41,"tag":191,"props":3462,"children":3463},{"style":204},[3464],{"type":47,"value":1237},{"type":41,"tag":191,"props":3466,"children":3467},{"style":1240},[3468],{"type":47,"value":3469},"TIMEOU",{"type":41,"tag":191,"props":3471,"children":3472},{"style":1246},[3473],{"type":47,"value":3474},"T",{"type":41,"tag":191,"props":3476,"children":3477},{"style":204},[3478],{"type":47,"value":1254},{"type":41,"tag":191,"props":3480,"children":3481},{"style":223},[3482],{"type":47,"value":3483}," 60",{"type":41,"tag":191,"props":3485,"children":3486},{"style":1246},[3487],{"type":47,"value":3006},{"type":41,"tag":191,"props":3489,"children":3490},{"class":193,"line":235},[3491,3496,3500,3504,3508,3512,3517],{"type":41,"tag":191,"props":3492,"children":3493},{"style":204},[3494],{"type":47,"value":3495},"  >>",{"type":41,"tag":191,"props":3497,"children":3498},{"style":204},[3499],{"type":47,"value":1237},{"type":41,"tag":191,"props":3501,"children":3502},{"style":1240},[3503],{"type":47,"value":2019},{"type":41,"tag":191,"props":3505,"children":3506},{"style":1246},[3507],{"type":47,"value":1249},{"type":41,"tag":191,"props":3509,"children":3510},{"style":204},[3511],{"type":47,"value":1254},{"type":41,"tag":191,"props":3513,"children":3514},{"style":1240},[3515],{"type":47,"value":3516},"\u002Fwatchdog_ddm.log",{"type":41,"tag":191,"props":3518,"children":3519},{"style":204},[3520],{"type":47,"value":3521}," 2>&1\n",{"type":41,"tag":180,"props":3523,"children":3526},{"className":3524,"code":3525,"language":47},[1051],"tail -f \u003Crun_dir>\u002Fwatchdog_ddm.log | grep --line-buffered -E \"DDM_DONE|DDM_FAILED|DDM_HANG|DDM_TIMEOUT\"\ntail -f \u003Crun_dir>\u002Fwatchdog_ddm.log | grep --line-buffered \"F1_UPDATE\"\n",[3527],{"type":41,"tag":91,"props":3528,"children":3529},{"__ignoreMap":185},[3530],{"type":47,"value":3525},{"type":41,"tag":61,"props":3532,"children":3533},{},[3534,3536,3541,3543,3548,3550,3555,3556,3562,3564,3570],{"type":47,"value":3535},"Monitor 1: ",{"type":41,"tag":91,"props":3537,"children":3539},{"className":3538},[],[3540],{"type":47,"value":653},{"type":47,"value":3542}," → mark done; ",{"type":41,"tag":91,"props":3544,"children":3546},{"className":3545},[],[3547],{"type":47,"value":661},{"type":47,"value":3549}," → read log tail, fix, restart; ",{"type":41,"tag":91,"props":3551,"children":3553},{"className":3552},[],[3554],{"type":47,"value":668},{"type":47,"value":2367},{"type":41,"tag":91,"props":3557,"children":3559},{"className":3558},[],[3560],{"type":47,"value":3561},"DDM_TIMEOUT",{"type":47,"value":3563}," → kill container, fix, restart.\nMonitor 2: ",{"type":41,"tag":91,"props":3565,"children":3567},{"className":3566},[],[3568],{"type":47,"value":3569},"F1_UPDATE",{"type":47,"value":3571}," → log F1 and loss.",{"type":41,"tag":61,"props":3573,"children":3574},{},[3575,3577,3583],{"type":47,"value":3576},"If Monitor silent >5 min: check ",{"type":41,"tag":91,"props":3578,"children":3580},{"className":3579},[],[3581],{"type":47,"value":3582},"ps aux | grep watch_ddm",{"type":47,"value":3584},"; restart watchdog if dead.",{"type":41,"tag":438,"props":3586,"children":3587},{},[3588,3604],{"type":41,"tag":442,"props":3589,"children":3590},{},[3591],{"type":41,"tag":446,"props":3592,"children":3593},{},[3594,3599],{"type":41,"tag":450,"props":3595,"children":3596},{},[3597],{"type":47,"value":3598},"Signal",{"type":41,"tag":450,"props":3600,"children":3601},{},[3602],{"type":47,"value":3603},"Auto-fix",{"type":41,"tag":466,"props":3605,"children":3606},{},[3607,3634,3655,3676,3703],{"type":41,"tag":446,"props":3608,"children":3609},{},[3610,3621],{"type":41,"tag":473,"props":3611,"children":3612},{},[3613,3619],{"type":41,"tag":91,"props":3614,"children":3616},{"className":3615},[],[3617],{"type":47,"value":3618},"failed",{"type":47,"value":3620}," immediately (\u003C 2 min)",{"type":41,"tag":473,"props":3622,"children":3623},{},[3624,3626,3632],{"type":47,"value":3625},"Read ",{"type":41,"tag":91,"props":3627,"children":3629},{"className":3628},[],[3630],{"type":47,"value":3631},"results\u002F\u003Cjob_id>\u002Flog.txt",{"type":47,"value":3633}," last 30 lines; fix config\u002Fdataset\u002FDB; restart",{"type":41,"tag":446,"props":3635,"children":3636},{},[3637,3642],{"type":41,"tag":473,"props":3638,"children":3639},{},[3640],{"type":47,"value":3641},"Loss NaN after first epoch",{"type":41,"tag":473,"props":3643,"children":3644},{},[3645,3647,3653],{"type":47,"value":3646},"Halve ",{"type":41,"tag":91,"props":3648,"children":3650},{"className":3649},[],[3651],{"type":47,"value":3652},"optm_lr",{"type":47,"value":3654},"; restart",{"type":41,"tag":446,"props":3656,"children":3657},{},[3658,3663],{"type":41,"tag":473,"props":3659,"children":3660},{},[3661],{"type":47,"value":3662},"Loss flat for 5 epochs (delta \u003C 5%)",{"type":41,"tag":473,"props":3664,"children":3665},{},[3666,3668,3674],{"type":47,"value":3667},"Check ",{"type":41,"tag":91,"props":3669,"children":3671},{"className":3670},[],[3672],{"type":47,"value":3673},"optm_warmup_steps",{"type":47,"value":3675},"; if > 30% of total steps, reduce; restart",{"type":41,"tag":446,"props":3677,"children":3678},{},[3679,3684],{"type":41,"tag":473,"props":3680,"children":3681},{},[3682],{"type":47,"value":3683},"GPU = 0% for >5 min",{"type":41,"tag":473,"props":3685,"children":3686},{},[3687,3688,3694,3696,3701],{"type":47,"value":3667},{"type":41,"tag":91,"props":3689,"children":3691},{"className":3690},[],[3692],{"type":47,"value":3693},"docker logs \u003Cddm_container>",{"type":47,"value":3695},"; if OOM reduce ",{"type":41,"tag":91,"props":3697,"children":3699},{"className":3698},[],[3700],{"type":47,"value":3056},{"type":47,"value":3702},"; if GPU lost restart container + job",{"type":41,"tag":446,"props":3704,"children":3705},{},[3706,3723],{"type":41,"tag":473,"props":3707,"children":3708},{},[3709,3715,3717],{"type":41,"tag":91,"props":3710,"children":3712},{"className":3711},[],[3713],{"type":47,"value":3714},"running",{"type":47,"value":3716}," after ",{"type":41,"tag":91,"props":3718,"children":3720},{"className":3719},[],[3721],{"type":47,"value":3722},"epochs × expected_epoch_time × 3",{"type":41,"tag":473,"props":3724,"children":3725},{},[3726],{"type":47,"value":3727},"Kill container, read log tail, restart",{"type":41,"tag":61,"props":3729,"children":3730},{},[3731,3732,3738],{"type":47,"value":2879},{"type":41,"tag":91,"props":3733,"children":3735},{"className":3734},[],[3736],{"type":47,"value":3737},"\u003Crun_dir>\u002Fprogress.md",{"type":47,"value":3739}," snapshot.",{"type":41,"tag":802,"props":3741,"children":3742},{},[],{"type":41,"tag":50,"props":3744,"children":3746},{"id":3745},"step-6-phase-4-vlm-training-run-iter-1-on-vlm-training-config-change-or-augment-config-change",[3747,3749],{"type":47,"value":3748},"Step 6: Phase 4 — VLM Training ",{"type":41,"tag":1453,"props":3750,"children":3751},{},[3752],{"type":47,"value":3753},"(run iter 1 + on VLM training-config-change or augment-config-change)",{"type":41,"tag":138,"props":3755,"children":3757},{"id":3756},"batch-size-and-learning-rate",[3758],{"type":47,"value":3759},"Batch Size and Learning Rate",{"type":41,"tag":61,"props":3761,"children":3762},{},[3763,3765,3771,3773,3779],{"type":47,"value":3764},"Set ",{"type":41,"tag":91,"props":3766,"children":3768},{"className":3767},[],[3769],{"type":47,"value":3770},"train_batch_per_replica",{"type":47,"value":3772}," in ",{"type":41,"tag":91,"props":3774,"children":3776},{"className":3775},[],[3777],{"type":47,"value":3778},"train_config.toml",{"type":47,"value":178},{"type":41,"tag":78,"props":3781,"children":3782},{},[3783],{"type":41,"tag":82,"props":3784,"children":3785},{},[3786],{"type":47,"value":3787},"Sufficient VRAM → 4; Low VRAM → 1. If OOM at batch=4, retry with batch=1.",{"type":41,"tag":61,"props":3789,"children":3790},{},[3791],{"type":41,"tag":67,"props":3792,"children":3793},{},[3794,3796,3802,3804,3809],{"type":47,"value":3795},"Learning rate — MODE-AWARE (LoRA vs full fine-tune). Check whether ",{"type":41,"tag":91,"props":3797,"children":3799},{"className":3798},[],[3800],{"type":47,"value":3801},"[policy.lora]",{"type":47,"value":3803}," is present in ",{"type":41,"tag":91,"props":3805,"children":3807},{"className":3806},[],[3808],{"type":47,"value":3778},{"type":47,"value":178},{"type":41,"tag":78,"props":3811,"children":3812},{},[3813,3836,3859,3864],{"type":41,"tag":82,"props":3814,"children":3815},{},[3816,3821,3822,3827,3829,3835],{"type":41,"tag":67,"props":3817,"children":3818},{},[3819],{"type":47,"value":3820},"LoRA run",{"type":47,"value":2806},{"type":41,"tag":91,"props":3823,"children":3825},{"className":3824},[],[3826],{"type":47,"value":3801},{"type":47,"value":3828}," present): small datasets (\u003C 20 videos) use ",{"type":41,"tag":91,"props":3830,"children":3832},{"className":3831},[],[3833],{"type":47,"value":3834},"optm_lr = [1.5e-5, 1.5e-5, 1.5e-5]",{"type":47,"value":136},{"type":41,"tag":82,"props":3837,"children":3838},{},[3839,3844,3846,3851,3853],{"type":41,"tag":67,"props":3840,"children":3841},{},[3842],{"type":47,"value":3843},"Full fine-tune run",{"type":47,"value":3845}," (no ",{"type":41,"tag":91,"props":3847,"children":3849},{"className":3848},[],[3850],{"type":47,"value":3801},{"type":47,"value":3852},"): small datasets (\u003C 20 videos) use ",{"type":41,"tag":91,"props":3854,"children":3856},{"className":3855},[],[3857],{"type":47,"value":3858},"optm_lr = [5e-6, 5e-6, 5e-6]",{"type":41,"tag":82,"props":3860,"children":3861},{},[3862],{"type":47,"value":3863},"Larger datasets (≥ 50 videos): service default may be acceptable; validate after iteration 1.",{"type":41,"tag":82,"props":3865,"children":3866},{},[3867],{"type":47,"value":3868},"Repeated action pair confusion despite correct DMCQ → check LR first.",{"type":41,"tag":138,"props":3870,"children":3872},{"id":3871},"vlm-training-watchdog",[3873],{"type":47,"value":3874},"VLM Training Watchdog",{"type":41,"tag":180,"props":3876,"children":3878},{"className":1217,"code":3877,"language":1219,"meta":185,"style":185},"bash ${SKILL_DIR}\u002Fscripts\u002Fwatch_api_job.sh \\\n  VLM \u003CCR_BASE_URL> \u003CJOB_ID> \u003CLOG_PATH> \u003CTIMEOUT> 120 \\\n  >> \u003Crun_dir>\u002Fwatchdog_vlm.log 2>&1\n",[3879],{"type":41,"tag":91,"props":3880,"children":3881},{"__ignoreMap":185},[3882,3909,3991],{"type":41,"tag":191,"props":3883,"children":3884},{"class":193,"line":194},[3885,3889,3893,3897,3901,3905],{"type":41,"tag":191,"props":3886,"children":3887},{"style":1229},[3888],{"type":47,"value":1219},{"type":41,"tag":191,"props":3890,"children":3891},{"style":204},[3892],{"type":47,"value":1806},{"type":41,"tag":191,"props":3894,"children":3895},{"style":1246},[3896],{"type":47,"value":1811},{"type":41,"tag":191,"props":3898,"children":3899},{"style":204},[3900],{"type":47,"value":1816},{"type":41,"tag":191,"props":3902,"children":3903},{"style":1240},[3904],{"type":47,"value":3394},{"type":41,"tag":191,"props":3906,"children":3907},{"style":1246},[3908],{"type":47,"value":3006},{"type":41,"tag":191,"props":3910,"children":3911},{"class":193,"line":210},[3912,3917,3921,3926,3930,3934,3938,3942,3946,3950,3954,3958,3962,3966,3970,3974,3978,3982,3987],{"type":41,"tag":191,"props":3913,"children":3914},{"style":1240},[3915],{"type":47,"value":3916},"  VLM",{"type":41,"tag":191,"props":3918,"children":3919},{"style":204},[3920],{"type":47,"value":1237},{"type":41,"tag":191,"props":3922,"children":3923},{"style":1240},[3924],{"type":47,"value":3925},"CR_BASE_UR",{"type":41,"tag":191,"props":3927,"children":3928},{"style":1246},[3929],{"type":47,"value":3420},{"type":41,"tag":191,"props":3931,"children":3932},{"style":204},[3933],{"type":47,"value":1254},{"type":41,"tag":191,"props":3935,"children":3936},{"style":204},[3937],{"type":47,"value":1237},{"type":41,"tag":191,"props":3939,"children":3940},{"style":1240},[3941],{"type":47,"value":3433},{"type":41,"tag":191,"props":3943,"children":3944},{"style":1246},[3945],{"type":47,"value":3438},{"type":41,"tag":191,"props":3947,"children":3948},{"style":204},[3949],{"type":47,"value":1254},{"type":41,"tag":191,"props":3951,"children":3952},{"style":204},[3953],{"type":47,"value":1237},{"type":41,"tag":191,"props":3955,"children":3956},{"style":1240},[3957],{"type":47,"value":3451},{"type":41,"tag":191,"props":3959,"children":3960},{"style":1246},[3961],{"type":47,"value":3456},{"type":41,"tag":191,"props":3963,"children":3964},{"style":204},[3965],{"type":47,"value":1254},{"type":41,"tag":191,"props":3967,"children":3968},{"style":204},[3969],{"type":47,"value":1237},{"type":41,"tag":191,"props":3971,"children":3972},{"style":1240},[3973],{"type":47,"value":3469},{"type":41,"tag":191,"props":3975,"children":3976},{"style":1246},[3977],{"type":47,"value":3474},{"type":41,"tag":191,"props":3979,"children":3980},{"style":204},[3981],{"type":47,"value":1254},{"type":41,"tag":191,"props":3983,"children":3984},{"style":223},[3985],{"type":47,"value":3986}," 120",{"type":41,"tag":191,"props":3988,"children":3989},{"style":1246},[3990],{"type":47,"value":3006},{"type":41,"tag":191,"props":3992,"children":3993},{"class":193,"line":235},[3994,3998,4002,4006,4010,4014,4019],{"type":41,"tag":191,"props":3995,"children":3996},{"style":204},[3997],{"type":47,"value":3495},{"type":41,"tag":191,"props":3999,"children":4000},{"style":204},[4001],{"type":47,"value":1237},{"type":41,"tag":191,"props":4003,"children":4004},{"style":1240},[4005],{"type":47,"value":2019},{"type":41,"tag":191,"props":4007,"children":4008},{"style":1246},[4009],{"type":47,"value":1249},{"type":41,"tag":191,"props":4011,"children":4012},{"style":204},[4013],{"type":47,"value":1254},{"type":41,"tag":191,"props":4015,"children":4016},{"style":1240},[4017],{"type":47,"value":4018},"\u002Fwatchdog_vlm.log",{"type":41,"tag":191,"props":4020,"children":4021},{"style":204},[4022],{"type":47,"value":3521},{"type":41,"tag":180,"props":4024,"children":4027},{"className":4025,"code":4026,"language":47},[1051],"tail -f \u003Crun_dir>\u002Fwatchdog_vlm.log | grep --line-buffered -E \"VLM_DONE|VLM_FAILED|VLM_HANG|VLM_TIMEOUT\"\ntail -f \u003Crun_dir>\u002Fwatchdog_vlm.log | grep --line-buffered \"status=running\"\n",[4028],{"type":41,"tag":91,"props":4029,"children":4030},{"__ignoreMap":185},[4031],{"type":47,"value":4026},{"type":41,"tag":61,"props":4033,"children":4034},{},[4035,4036,4041,4043,4048,4050,4055,4056,4061],{"type":47,"value":3535},{"type":41,"tag":91,"props":4037,"children":4039},{"className":4038},[],[4040],{"type":47,"value":704},{"type":47,"value":4042}," → proceed to 6a; ",{"type":41,"tag":91,"props":4044,"children":4046},{"className":4045},[],[4047],{"type":47,"value":711},{"type":47,"value":4049}," → read log tail, fix; ",{"type":41,"tag":91,"props":4051,"children":4053},{"className":4052},[],[4054],{"type":47,"value":718},{"type":47,"value":2367},{"type":41,"tag":91,"props":4057,"children":4059},{"className":4058},[],[4060],{"type":47,"value":725},{"type":47,"value":4062}," → kill CR container, fix, restart.",{"type":41,"tag":61,"props":4064,"children":4065},{},[4066,4068,4074],{"type":47,"value":4067},"If Monitor silent >10 min: check ",{"type":41,"tag":91,"props":4069,"children":4071},{"className":4070},[],[4072],{"type":47,"value":4073},"ps aux | grep watch_vlm",{"type":47,"value":3584},{"type":41,"tag":438,"props":4076,"children":4077},{},[4078,4092],{"type":41,"tag":442,"props":4079,"children":4080},{},[4081],{"type":41,"tag":446,"props":4082,"children":4083},{},[4084,4088],{"type":41,"tag":450,"props":4085,"children":4086},{},[4087],{"type":47,"value":3598},{"type":41,"tag":450,"props":4089,"children":4090},{},[4091],{"type":47,"value":3603},{"type":41,"tag":466,"props":4093,"children":4094},{},[4095,4113,4132,4145,4171,4196],{"type":41,"tag":446,"props":4096,"children":4097},{},[4098,4108],{"type":41,"tag":473,"props":4099,"children":4100},{},[4101,4106],{"type":41,"tag":91,"props":4102,"children":4104},{"className":4103},[],[4105],{"type":47,"value":3618},{"type":47,"value":4107}," immediately (\u003C 5 min)",{"type":41,"tag":473,"props":4109,"children":4110},{},[4111],{"type":47,"value":4112},"Read service container logs (dataset mount, DB, config parse); fix and restart",{"type":41,"tag":446,"props":4114,"children":4115},{},[4116,4121],{"type":41,"tag":473,"props":4117,"children":4118},{},[4119],{"type":47,"value":4120},"Loss NaN at any step",{"type":41,"tag":473,"props":4122,"children":4123},{},[4124,4126,4131],{"type":47,"value":4125},"Cancel; halve all ",{"type":41,"tag":91,"props":4127,"children":4129},{"className":4128},[],[4130],{"type":47,"value":3652},{"type":47,"value":3654},{"type":41,"tag":446,"props":4133,"children":4134},{},[4135,4140],{"type":41,"tag":473,"props":4136,"children":4137},{},[4138],{"type":47,"value":4139},"Loss drops >90% early AND by-action shows collapse",{"type":41,"tag":473,"props":4141,"children":4142},{},[4143],{"type":47,"value":4144},"Note: reduce LR next iteration; do not cancel unless NaN",{"type":41,"tag":446,"props":4146,"children":4147},{},[4148,4153],{"type":41,"tag":473,"props":4149,"children":4150},{},[4151],{"type":47,"value":4152},"GPU = 0% for >10 min",{"type":41,"tag":473,"props":4154,"children":4155},{},[4156,4157,4163,4164,4169],{"type":47,"value":3667},{"type":41,"tag":91,"props":4158,"children":4160},{"className":4159},[],[4161],{"type":47,"value":4162},"docker logs \u003Ccr_container>",{"type":47,"value":3695},{"type":41,"tag":91,"props":4165,"children":4167},{"className":4166},[],[4168],{"type":47,"value":3770},{"type":47,"value":4170}," to 1; if GPU reset restart container + job",{"type":41,"tag":446,"props":4172,"children":4173},{},[4174,4192],{"type":41,"tag":473,"props":4175,"children":4176},{},[4177,4182,4184,4190],{"type":41,"tag":91,"props":4178,"children":4180},{"className":4179},[],[4181],{"type":47,"value":3714},{"type":47,"value":4183}," for > ",{"type":41,"tag":91,"props":4185,"children":4187},{"className":4186},[],[4188],{"type":47,"value":4189},"epochs × ~2h",{"type":47,"value":4191}," with no progress",{"type":41,"tag":473,"props":4193,"children":4194},{},[4195],{"type":47,"value":3727},{"type":41,"tag":446,"props":4197,"children":4198},{},[4199,4209],{"type":41,"tag":473,"props":4200,"children":4201},{},[4202,4207],{"type":41,"tag":91,"props":4203,"children":4205},{"className":4204},[],[4206],{"type":47,"value":3618},{"type":47,"value":4208}," after partial training",{"type":41,"tag":473,"props":4210,"children":4211},{},[4212,4213,4219],{"type":47,"value":3667},{"type":41,"tag":91,"props":4214,"children":4216},{"className":4215},[],[4217],{"type":47,"value":4218},"results\u002F\u003Cjob_id>\u002Fsafetensors\u002F",{"type":47,"value":4220}," for valid checkpoint; eval before restarting training",{"type":41,"tag":61,"props":4222,"children":4223},{},[4224,4226,4232],{"type":47,"value":4225},"When re-running: apply RCA config changes; increment ",{"type":41,"tag":91,"props":4227,"children":4229},{"className":4228},[],[4230],{"type":47,"value":4231},"vlm_config_version",{"type":47,"value":136},{"type":41,"tag":61,"props":4234,"children":4235},{},[4236,4237,4243,4244],{"type":47,"value":2879},{"type":41,"tag":91,"props":4238,"children":4240},{"className":4239},[],[4241],{"type":47,"value":4242},"phase_status.vlm_train: in_progress",{"type":47,"value":2492},{"type":41,"tag":67,"props":4245,"children":4246},{},[4247,4248,4254,4255,4260],{"type":47,"value":2897},{"type":41,"tag":91,"props":4249,"children":4251},{"className":4250},[],[4252],{"type":47,"value":4253},"\u002Fsop-cr-finetuning",{"type":47,"value":2798},{"type":41,"tag":91,"props":4256,"children":4258},{"className":4257},[],[4259],{"type":47,"value":2538},{"type":47,"value":136},{"type":41,"tag":138,"props":4262,"children":4264},{"id":4263},"_6a-record-training-mode",[4265],{"type":47,"value":4266},"6a. Record training mode",{"type":41,"tag":61,"props":4268,"children":4269},{},[4270,4272,4277,4279,4285,4286,4291],{"type":47,"value":4271},"The Step 6 delegation to ",{"type":41,"tag":91,"props":4273,"children":4275},{"className":4274},[],[4276],{"type":47,"value":4253},{"type":47,"value":4278}," runs the whole training procedure end-to-end — including its own LoRA detection and merge. On return, ",{"type":41,"tag":91,"props":4280,"children":4282},{"className":4281},[],[4283],{"type":47,"value":4284},"\u003Cresults_dir>\u002F\u003Ctimestamp>\u002Fsafetensors\u002Fstep_\u003CN>\u002F",{"type":47,"value":565},{"type":41,"tag":67,"props":4287,"children":4288},{},[4289],{"type":47,"value":4290},"always",{"type":47,"value":4292}," a self-contained, inference-ready HF model.",{"type":41,"tag":61,"props":4294,"children":4295},{},[4296,4298,4304,4306,4312],{"type":47,"value":4297},"Record training mode by checking whether cr-finetuning's merge step left a ",{"type":41,"tag":91,"props":4299,"children":4301},{"className":4300},[],[4302],{"type":47,"value":4303},"step_\u003CN>_lora_adapter\u002F",{"type":47,"value":4305}," sibling next to ",{"type":41,"tag":91,"props":4307,"children":4309},{"className":4308},[],[4310],{"type":47,"value":4311},"step_\u003CN>\u002F",{"type":47,"value":178},{"type":41,"tag":78,"props":4314,"children":4315},{},[4316,4326],{"type":41,"tag":82,"props":4317,"children":4318},{},[4319,4324],{"type":41,"tag":67,"props":4320,"children":4321},{},[4322],{"type":47,"value":4323},"Sibling exists",{"type":47,"value":4325}," → LoRA run. cr-finetuning Phase 3b created the backup during the in-place merge.",{"type":41,"tag":82,"props":4327,"children":4328},{},[4329,4334,4336,4341],{"type":41,"tag":67,"props":4330,"children":4331},{},[4332],{"type":47,"value":4333},"Sibling absent",{"type":47,"value":4335}," → Full fine-tune. No merge was needed; ",{"type":41,"tag":91,"props":4337,"children":4339},{"className":4338},[],[4340],{"type":47,"value":4311},{"type":47,"value":4342}," was written as a full model directly by training.",{"type":41,"tag":61,"props":4344,"children":4345},{},[4346,4348,4353],{"type":47,"value":4347},"Set in ",{"type":41,"tag":91,"props":4349,"children":4351},{"className":4350},[],[4352],{"type":47,"value":104},{"type":47,"value":178},{"type":41,"tag":438,"props":4355,"children":4356},{},[4357,4376],{"type":41,"tag":442,"props":4358,"children":4359},{},[4360],{"type":41,"tag":446,"props":4361,"children":4362},{},[4363,4368,4372],{"type":41,"tag":450,"props":4364,"children":4365},{},[4366],{"type":47,"value":4367},"Field",{"type":41,"tag":450,"props":4369,"children":4370},{},[4371],{"type":47,"value":3820},{"type":41,"tag":450,"props":4373,"children":4374},{},[4375],{"type":47,"value":3843},{"type":41,"tag":466,"props":4377,"children":4378},{},[4379,4409,4439],{"type":41,"tag":446,"props":4380,"children":4381},{},[4382,4391,4400],{"type":41,"tag":473,"props":4383,"children":4384},{},[4385],{"type":41,"tag":91,"props":4386,"children":4388},{"className":4387},[],[4389],{"type":47,"value":4390},"vlm_training_mode",{"type":41,"tag":473,"props":4392,"children":4393},{},[4394],{"type":41,"tag":91,"props":4395,"children":4397},{"className":4396},[],[4398],{"type":47,"value":4399},"\"lora\"",{"type":41,"tag":473,"props":4401,"children":4402},{},[4403],{"type":41,"tag":91,"props":4404,"children":4406},{"className":4405},[],[4407],{"type":47,"value":4408},"\"full\"",{"type":41,"tag":446,"props":4410,"children":4411},{},[4412,4421,4430],{"type":41,"tag":473,"props":4413,"children":4414},{},[4415],{"type":41,"tag":91,"props":4416,"children":4418},{"className":4417},[],[4419],{"type":47,"value":4420},"vlm_adapter_path",{"type":41,"tag":473,"props":4422,"children":4423},{},[4424],{"type":41,"tag":91,"props":4425,"children":4427},{"className":4426},[],[4428],{"type":47,"value":4429},"\u003Cresults_dir>\u002F\u003Cts>\u002Fsafetensors\u002Fstep_\u003CN>_lora_adapter",{"type":41,"tag":473,"props":4431,"children":4432},{},[4433],{"type":41,"tag":91,"props":4434,"children":4436},{"className":4435},[],[4437],{"type":47,"value":4438},"null",{"type":41,"tag":446,"props":4440,"children":4441},{},[4442,4451,4460],{"type":41,"tag":473,"props":4443,"children":4444},{},[4445],{"type":41,"tag":91,"props":4446,"children":4448},{"className":4447},[],[4449],{"type":47,"value":4450},"vlm_inference_path",{"type":41,"tag":473,"props":4452,"children":4453},{},[4454],{"type":41,"tag":91,"props":4455,"children":4457},{"className":4456},[],[4458],{"type":47,"value":4459},"\u003Cresults_dir>\u002F\u003Cts>\u002Fsafetensors\u002Fstep_\u003CN>",{"type":41,"tag":473,"props":4461,"children":4462},{},[4463],{"type":41,"tag":91,"props":4464,"children":4466},{"className":4465},[],[4467],{"type":47,"value":4459},{"type":41,"tag":61,"props":4469,"children":4470},{},[4471,4476],{"type":41,"tag":91,"props":4472,"children":4474},{"className":4473},[],[4475],{"type":47,"value":4450},{"type":47,"value":4477}," is the same path in both modes. No LoRA-vs-full branching is needed in Step 7.",{"type":41,"tag":61,"props":4479,"children":4480},{},[4481,4482,4488,4489,4494],{"type":47,"value":2879},{"type":41,"tag":91,"props":4483,"children":4485},{"className":4484},[],[4486],{"type":47,"value":4487},"phase_status.vlm_train: done",{"type":47,"value":1558},{"type":41,"tag":91,"props":4490,"children":4492},{"className":4491},[],[4493],{"type":47,"value":104},{"type":47,"value":136},{"type":41,"tag":61,"props":4496,"children":4497},{},[4498,4500,4506,4508,4514,4515,4521,4523,4529,4531,4537],{"type":47,"value":4499},"Keep top-3 job_ids by ",{"type":41,"tag":91,"props":4501,"children":4503},{"className":4502},[],[4504],{"type":47,"value":4505},"eval_history.e2e_seq_acc",{"type":47,"value":4507},"; delete ",{"type":41,"tag":91,"props":4509,"children":4511},{"className":4510},[],[4512],{"type":47,"value":4513},"*.safetensors",{"type":47,"value":1444},{"type":41,"tag":91,"props":4516,"children":4518},{"className":4517},[],[4519],{"type":47,"value":4520},"adapter_model.*",{"type":47,"value":4522}," from others. Never delete ",{"type":41,"tag":91,"props":4524,"children":4526},{"className":4525},[],[4527],{"type":47,"value":4528},"log.txt",{"type":47,"value":4530},", configs, or tokenizer files. Via ",{"type":41,"tag":91,"props":4532,"children":4534},{"className":4533},[],[4535],{"type":47,"value":4536},"docker exec \u003Ccr2_container>",{"type":47,"value":178},{"type":41,"tag":180,"props":4539,"children":4541},{"className":1217,"code":4540,"language":1219,"meta":185,"style":185},"KEEP=\"\u003Cjob_id_1> \u003Cjob_id_2> \u003Cjob_id_3>\"  # from run_state.yaml eval_history\ndocker exec \u003Ccr2_container> bash -c \"\n  for d in \u002Fworkspace\u002Fsop-cr-ftms\u002Fassets\u002Fresults\u002F*\u002F; do\n    j=\\$(basename \\\"\\$d\\\")\n    echo '$KEEP' | grep -q \\\"\\$j\\\" && continue\n    find \\\"\\$d\\\" -name '*.safetensors' -o -name 'adapter_model.*' | xargs -r rm -f\n  done\n\"\n",[4542],{"type":41,"tag":91,"props":4543,"children":4544},{"__ignoreMap":185},[4545,4576,4616,4624,4662,4698,4723,4731],{"type":41,"tag":191,"props":4546,"children":4547},{"class":193,"line":194},[4548,4553,4558,4562,4567,4571],{"type":41,"tag":191,"props":4549,"children":4550},{"style":1246},[4551],{"type":47,"value":4552},"KEEP",{"type":41,"tag":191,"props":4554,"children":4555},{"style":204},[4556],{"type":47,"value":4557},"=",{"type":41,"tag":191,"props":4559,"children":4560},{"style":204},[4561],{"type":47,"value":2634},{"type":41,"tag":191,"props":4563,"children":4564},{"style":1240},[4565],{"type":47,"value":4566},"\u003Cjob_id_1> \u003Cjob_id_2> \u003Cjob_id_3>",{"type":41,"tag":191,"props":4568,"children":4569},{"style":204},[4570],{"type":47,"value":2634},{"type":41,"tag":191,"props":4572,"children":4573},{"style":229},[4574],{"type":47,"value":4575},"  # from run_state.yaml eval_history\n",{"type":41,"tag":191,"props":4577,"children":4578},{"class":193,"line":210},[4579,4583,4587,4591,4596,4600,4604,4608,4612],{"type":41,"tag":191,"props":4580,"children":4581},{"style":1229},[4582],{"type":47,"value":2969},{"type":41,"tag":191,"props":4584,"children":4585},{"style":1240},[4586],{"type":47,"value":2974},{"type":41,"tag":191,"props":4588,"children":4589},{"style":204},[4590],{"type":47,"value":1237},{"type":41,"tag":191,"props":4592,"children":4593},{"style":1240},[4594],{"type":47,"value":4595},"cr2_containe",{"type":41,"tag":191,"props":4597,"children":4598},{"style":1246},[4599],{"type":47,"value":1249},{"type":41,"tag":191,"props":4601,"children":4602},{"style":204},[4603],{"type":47,"value":1254},{"type":41,"tag":191,"props":4605,"children":4606},{"style":1240},[4607],{"type":47,"value":2996},{"type":41,"tag":191,"props":4609,"children":4610},{"style":1240},[4611],{"type":47,"value":3001},{"type":41,"tag":191,"props":4613,"children":4614},{"style":204},[4615],{"type":47,"value":3289},{"type":41,"tag":191,"props":4617,"children":4618},{"class":193,"line":235},[4619],{"type":41,"tag":191,"props":4620,"children":4621},{"style":1240},[4622],{"type":47,"value":4623},"  for d in \u002Fworkspace\u002Fsop-cr-ftms\u002Fassets\u002Fresults\u002F*\u002F; do\n",{"type":41,"tag":191,"props":4625,"children":4626},{"class":193,"line":258},[4627,4632,4637,4642,4647,4652,4657],{"type":41,"tag":191,"props":4628,"children":4629},{"style":1240},[4630],{"type":47,"value":4631},"    j=",{"type":41,"tag":191,"props":4633,"children":4634},{"style":1246},[4635],{"type":47,"value":4636},"\\$",{"type":41,"tag":191,"props":4638,"children":4639},{"style":1240},[4640],{"type":47,"value":4641},"(basename ",{"type":41,"tag":191,"props":4643,"children":4644},{"style":1246},[4645],{"type":47,"value":4646},"\\\"\\$",{"type":41,"tag":191,"props":4648,"children":4649},{"style":1240},[4650],{"type":47,"value":4651},"d",{"type":41,"tag":191,"props":4653,"children":4654},{"style":1246},[4655],{"type":47,"value":4656},"\\\"",{"type":41,"tag":191,"props":4658,"children":4659},{"style":1240},[4660],{"type":47,"value":4661},")\n",{"type":41,"tag":191,"props":4663,"children":4664},{"class":193,"line":280},[4665,4670,4675,4680,4684,4689,4693],{"type":41,"tag":191,"props":4666,"children":4667},{"style":1240},[4668],{"type":47,"value":4669},"    echo '",{"type":41,"tag":191,"props":4671,"children":4672},{"style":1246},[4673],{"type":47,"value":4674},"$KEEP",{"type":41,"tag":191,"props":4676,"children":4677},{"style":1240},[4678],{"type":47,"value":4679},"' | grep -q ",{"type":41,"tag":191,"props":4681,"children":4682},{"style":1246},[4683],{"type":47,"value":4646},{"type":41,"tag":191,"props":4685,"children":4686},{"style":1240},[4687],{"type":47,"value":4688},"j",{"type":41,"tag":191,"props":4690,"children":4691},{"style":1246},[4692],{"type":47,"value":4656},{"type":41,"tag":191,"props":4694,"children":4695},{"style":1240},[4696],{"type":47,"value":4697}," && continue\n",{"type":41,"tag":191,"props":4699,"children":4700},{"class":193,"line":302},[4701,4706,4710,4714,4718],{"type":41,"tag":191,"props":4702,"children":4703},{"style":1240},[4704],{"type":47,"value":4705},"    find ",{"type":41,"tag":191,"props":4707,"children":4708},{"style":1246},[4709],{"type":47,"value":4646},{"type":41,"tag":191,"props":4711,"children":4712},{"style":1240},[4713],{"type":47,"value":4651},{"type":41,"tag":191,"props":4715,"children":4716},{"style":1246},[4717],{"type":47,"value":4656},{"type":41,"tag":191,"props":4719,"children":4720},{"style":1240},[4721],{"type":47,"value":4722}," -name '*.safetensors' -o -name 'adapter_model.*' | xargs -r rm -f\n",{"type":41,"tag":191,"props":4724,"children":4725},{"class":193,"line":324},[4726],{"type":41,"tag":191,"props":4727,"children":4728},{"style":1240},[4729],{"type":47,"value":4730},"  done\n",{"type":41,"tag":191,"props":4732,"children":4733},{"class":193,"line":342},[4734],{"type":41,"tag":191,"props":4735,"children":4736},{"style":204},[4737],{"type":47,"value":2709},{"type":41,"tag":802,"props":4739,"children":4740},{},[],{"type":41,"tag":50,"props":4742,"children":4744},{"id":4743},"step-7-phase-5-evaluation",[4745],{"type":47,"value":4746},"Step 7: Phase 5 — Evaluation",{"type":41,"tag":61,"props":4748,"children":4749},{},[4750],{"type":47,"value":4751},"Run both evaluations in parallel if possible, otherwise sequentially.",{"type":41,"tag":61,"props":4753,"children":4754},{},[4755,4760,4762,4767,4768,4773,4775,4781,4783,4789,4791,4797],{"type":41,"tag":67,"props":4756,"children":4757},{},[4758],{"type":47,"value":4759},"Eval is API-driven.",{"type":47,"value":4761}," Both ",{"type":41,"tag":91,"props":4763,"children":4765},{"className":4764},[],[4766],{"type":47,"value":750},{"type":47,"value":1444},{"type":41,"tag":91,"props":4769,"children":4771},{"className":4770},[],[4772],{"type":47,"value":780},{"type":47,"value":4774}," POST to the BP ",{"type":41,"tag":91,"props":4776,"children":4778},{"className":4777},[],[4779],{"type":47,"value":4780},"evaluation-ms",{"type":47,"value":4782}," HTTP service (default ",{"type":41,"tag":91,"props":4784,"children":4786},{"className":4785},[],[4787],{"type":47,"value":4788},"localhost:32090",{"type":47,"value":4790},") and return a structured JSON envelope on stdout. Eval-ms decides the output directory (uuid under its ",{"type":41,"tag":91,"props":4792,"children":4794},{"className":4793},[],[4795],{"type":47,"value":4796},"RESULTS_ROOT",{"type":47,"value":4798},"); the orchestrator only records the host-side paths from the envelope.",{"type":41,"tag":61,"props":4800,"children":4801},{},[4802],{"type":41,"tag":67,"props":4803,"children":4804},{},[4805],{"type":47,"value":4806},"Pre-eval requirements:",{"type":41,"tag":78,"props":4808,"children":4809},{},[4810,4828,4841,4874],{"type":41,"tag":82,"props":4811,"children":4812},{},[4813,4819,4820,4826],{"type":41,"tag":91,"props":4814,"children":4816},{"className":4815},[],[4817],{"type":47,"value":4818},"run_state.training_job_id",{"type":47,"value":1444},{"type":41,"tag":91,"props":4821,"children":4823},{"className":4822},[],[4824],{"type":47,"value":4825},"run_state.val_dataset_id",{"type":47,"value":4827}," must be set (populated when the training and dataset registration steps complete).",{"type":41,"tag":82,"props":4829,"children":4830},{},[4831,4833,4839],{"type":47,"value":4832},"For E2E: ",{"type":41,"tag":91,"props":4834,"children":4836},{"className":4835},[],[4837],{"type":47,"value":4838},"run_state.ddm_training_job_id",{"type":47,"value":4840}," must be set.",{"type":41,"tag":82,"props":4842,"children":4843},{},[4844,4845,4851,4852,4858,4859,4865,4867,4872],{"type":47,"value":3625},{"type":41,"tag":91,"props":4846,"children":4848},{"className":4847},[],[4849],{"type":47,"value":4850},"fps",{"type":47,"value":655},{"type":41,"tag":91,"props":4853,"children":4855},{"className":4854},[],[4856],{"type":47,"value":4857},"max_frames",{"type":47,"value":655},{"type":41,"tag":91,"props":4860,"children":4862},{"className":4861},[],[4863],{"type":47,"value":4864},"total_pixels",{"type":47,"value":4866}," from ",{"type":41,"tag":91,"props":4868,"children":4870},{"className":4869},[],[4871],{"type":47,"value":2417},{"type":47,"value":4873}," and write them into the eval inputs.yaml. Never use eval-script defaults.",{"type":41,"tag":82,"props":4875,"children":4876},{},[4877,4883,4885,4891,4893,4899],{"type":41,"tag":91,"props":4878,"children":4880},{"className":4879},[],[4881],{"type":47,"value":4882},"run_state.host_results_root",{"type":47,"value":4884}," must point at the host directory that docker-compose maps to ",{"type":41,"tag":91,"props":4886,"children":4888},{"className":4887},[],[4889],{"type":47,"value":4890},"\u002Fworkspace\u002Fsop-eval-ms\u002Fassets\u002Fresults",{"type":47,"value":4892},". Default: ",{"type":41,"tag":91,"props":4894,"children":4896},{"className":4895},[],[4897],{"type":47,"value":4898},"\u003Cbp_deployment_root>\u002Fassets\u002Fresults",{"type":47,"value":136},{"type":41,"tag":138,"props":4901,"children":4903},{"id":4902},"_7-pre-eval-ms-reachability-check",[4904],{"type":47,"value":4905},"7-pre. eval-ms reachability check",{"type":41,"tag":180,"props":4907,"children":4909},{"className":1217,"code":4908,"language":1219,"meta":185,"style":185},"curl -fsS http:\u002F\u002F${EVAL_HOST:-localhost}:${EVAL_PORT:-32090}\u002Fhealth\n",[4910],{"type":41,"tag":91,"props":4911,"children":4912},{"__ignoreMap":185},[4913],{"type":41,"tag":191,"props":4914,"children":4915},{"class":193,"line":194},[4916,4921,4926,4931,4936,4941,4946,4951,4955,4959,4963,4968,4972,4977,4981],{"type":41,"tag":191,"props":4917,"children":4918},{"style":1229},[4919],{"type":47,"value":4920},"curl",{"type":41,"tag":191,"props":4922,"children":4923},{"style":1240},[4924],{"type":47,"value":4925}," -fsS",{"type":41,"tag":191,"props":4927,"children":4928},{"style":1240},[4929],{"type":47,"value":4930}," http:\u002F\u002F",{"type":41,"tag":191,"props":4932,"children":4933},{"style":204},[4934],{"type":47,"value":4935},"${",{"type":41,"tag":191,"props":4937,"children":4938},{"style":1246},[4939],{"type":47,"value":4940},"EVAL_HOST",{"type":41,"tag":191,"props":4942,"children":4943},{"style":204},[4944],{"type":47,"value":4945},":-",{"type":41,"tag":191,"props":4947,"children":4948},{"style":1246},[4949],{"type":47,"value":4950},"localhost",{"type":41,"tag":191,"props":4952,"children":4953},{"style":204},[4954],{"type":47,"value":1816},{"type":41,"tag":191,"props":4956,"children":4957},{"style":1240},[4958],{"type":47,"value":178},{"type":41,"tag":191,"props":4960,"children":4961},{"style":204},[4962],{"type":47,"value":4935},{"type":41,"tag":191,"props":4964,"children":4965},{"style":1246},[4966],{"type":47,"value":4967},"EVAL_PORT",{"type":41,"tag":191,"props":4969,"children":4970},{"style":204},[4971],{"type":47,"value":4945},{"type":41,"tag":191,"props":4973,"children":4974},{"style":1246},[4975],{"type":47,"value":4976},"32090",{"type":41,"tag":191,"props":4978,"children":4979},{"style":204},[4980],{"type":47,"value":1816},{"type":41,"tag":191,"props":4982,"children":4983},{"style":1240},[4984],{"type":47,"value":4985},"\u002Fhealth\n",{"type":41,"tag":61,"props":4987,"children":4988},{},[4989,4991,4997],{"type":47,"value":4990},"Non-2xx → stop and tell the user to bring eval-ms up (",{"type":41,"tag":91,"props":4992,"children":4994},{"className":4993},[],[4995],{"type":47,"value":4996},"docker compose up evaluation-ms",{"type":47,"value":4998}," from the BP deployment root) before retrying.",{"type":41,"tag":138,"props":5000,"children":5002},{"id":5001},"_7a-by-action-evaluation",[5003],{"type":47,"value":5004},"7a. By-Action Evaluation",{"type":41,"tag":61,"props":5006,"children":5007},{},[5008,5010,5016,5017,5027,5028,5034,5036,5042,5044,5050,5052,5058,5059,5065,5067,5073,5075,5081,5083,5088,5089,5094],{"type":47,"value":5009},"Generate ",{"type":41,"tag":91,"props":5011,"children":5013},{"className":5012},[],[5014],{"type":47,"value":5015},"inputs_by_action_iter\u003CN>.yaml",{"type":47,"value":2813},{"type":41,"tag":67,"props":5018,"children":5019},{},[5020,5022],{"type":47,"value":5021},"into ",{"type":41,"tag":91,"props":5023,"children":5025},{"className":5024},[],[5026],{"type":47,"value":1691},{"type":47,"value":4866},{"type":41,"tag":91,"props":5029,"children":5031},{"className":5030},[],[5032],{"type":47,"value":5033},"${SKILL_DIR}\u002Freferences\u002Fby-action-eval-template.yaml",{"type":47,"value":5035},". Required fields: ",{"type":41,"tag":91,"props":5037,"children":5039},{"className":5038},[],[5040],{"type":47,"value":5041},"training_job_id",{"type":47,"value":5043}," (from ",{"type":41,"tag":91,"props":5045,"children":5047},{"className":5046},[],[5048],{"type":47,"value":5049},"run_state",{"type":47,"value":5051},"), ",{"type":41,"tag":91,"props":5053,"children":5055},{"className":5054},[],[5056],{"type":47,"value":5057},"val_dataset_id",{"type":47,"value":655},{"type":41,"tag":91,"props":5060,"children":5062},{"className":5061},[],[5063],{"type":47,"value":5064},"host_results_root",{"type":47,"value":5066},". Set ",{"type":41,"tag":91,"props":5068,"children":5070},{"className":5069},[],[5071],{"type":47,"value":5072},"backend: transformers",{"type":47,"value":5074}," for LoRA evaluations; ",{"type":41,"tag":91,"props":5076,"children":5078},{"className":5077},[],[5079],{"type":47,"value":5080},"vllm",{"type":47,"value":5082}," for full-FT. Pass ",{"type":41,"tag":91,"props":5084,"children":5086},{"className":5085},[],[5087],{"type":47,"value":4850},{"type":47,"value":4866},{"type":41,"tag":91,"props":5090,"children":5092},{"className":5091},[],[5093],{"type":47,"value":3778},{"type":47,"value":136},{"type":41,"tag":61,"props":5096,"children":5097},{},[5098,5099,5105,5106,5115],{"type":47,"value":2879},{"type":41,"tag":91,"props":5100,"children":5102},{"className":5101},[],[5103],{"type":47,"value":5104},"phase_status.eval_by_action: in_progress",{"type":47,"value":2492},{"type":41,"tag":67,"props":5107,"children":5108},{},[5109,5110],{"type":47,"value":2897},{"type":41,"tag":91,"props":5111,"children":5113},{"className":5112},[],[5114],{"type":47,"value":750},{"type":47,"value":5116}," with the generated inputs.yaml.",{"type":41,"tag":61,"props":5118,"children":5119},{},[5120,5125,5127,5133],{"type":41,"tag":67,"props":5121,"children":5122},{},[5123],{"type":47,"value":5124},"Capture the JSON envelope.",{"type":47,"value":5126}," The skill emits a single JSON line on its last stdout. Parse it and persist into ",{"type":41,"tag":91,"props":5128,"children":5130},{"className":5129},[],[5131],{"type":47,"value":5132},"run_state.eval_outputs.by_action",{"type":47,"value":178},{"type":41,"tag":180,"props":5135,"children":5137},{"className":182,"code":5136,"language":184,"meta":185,"style":185},"eval_outputs:\n  by_action:\n    eval_job_id: \u003Cenvelope.eval_job_id>\n    host_output_dir: \u003Cenvelope.host_output_dir>\n    snapshot_dir: \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action       # full copy made in Step 7c\n    inference_results_json: \u003Cenvelope.artifacts.inference_results_json>\n    log: \u003Cenvelope.artifacts.log>\n    overall_accuracy_evalms: \u003Cenvelope.headline_metrics.overall_accuracy>\n    overall_accuracy_authoritative: null   # filled by analyze_by_action_confusion in Step 8b\n",[5138],{"type":41,"tag":91,"props":5139,"children":5140},{"__ignoreMap":185},[5141,5153,5165,5182,5199,5221,5238,5255,5272],{"type":41,"tag":191,"props":5142,"children":5143},{"class":193,"line":194},[5144,5149],{"type":41,"tag":191,"props":5145,"children":5146},{"style":198},[5147],{"type":47,"value":5148},"eval_outputs",{"type":41,"tag":191,"props":5150,"children":5151},{"style":204},[5152],{"type":47,"value":207},{"type":41,"tag":191,"props":5154,"children":5155},{"class":193,"line":210},[5156,5161],{"type":41,"tag":191,"props":5157,"children":5158},{"style":198},[5159],{"type":47,"value":5160},"  by_action",{"type":41,"tag":191,"props":5162,"children":5163},{"style":204},[5164],{"type":47,"value":207},{"type":41,"tag":191,"props":5166,"children":5167},{"class":193,"line":235},[5168,5173,5177],{"type":41,"tag":191,"props":5169,"children":5170},{"style":198},[5171],{"type":47,"value":5172},"    eval_job_id",{"type":41,"tag":191,"props":5174,"children":5175},{"style":204},[5176],{"type":47,"value":178},{"type":41,"tag":191,"props":5178,"children":5179},{"style":1240},[5180],{"type":47,"value":5181}," \u003Cenvelope.eval_job_id>\n",{"type":41,"tag":191,"props":5183,"children":5184},{"class":193,"line":258},[5185,5190,5194],{"type":41,"tag":191,"props":5186,"children":5187},{"style":198},[5188],{"type":47,"value":5189},"    host_output_dir",{"type":41,"tag":191,"props":5191,"children":5192},{"style":204},[5193],{"type":47,"value":178},{"type":41,"tag":191,"props":5195,"children":5196},{"style":1240},[5197],{"type":47,"value":5198}," \u003Cenvelope.host_output_dir>\n",{"type":41,"tag":191,"props":5200,"children":5201},{"class":193,"line":280},[5202,5207,5211,5216],{"type":41,"tag":191,"props":5203,"children":5204},{"style":198},[5205],{"type":47,"value":5206},"    snapshot_dir",{"type":41,"tag":191,"props":5208,"children":5209},{"style":204},[5210],{"type":47,"value":178},{"type":41,"tag":191,"props":5212,"children":5213},{"style":1240},[5214],{"type":47,"value":5215}," \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action",{"type":41,"tag":191,"props":5217,"children":5218},{"style":229},[5219],{"type":47,"value":5220},"       # full copy made in Step 7c\n",{"type":41,"tag":191,"props":5222,"children":5223},{"class":193,"line":302},[5224,5229,5233],{"type":41,"tag":191,"props":5225,"children":5226},{"style":198},[5227],{"type":47,"value":5228},"    inference_results_json",{"type":41,"tag":191,"props":5230,"children":5231},{"style":204},[5232],{"type":47,"value":178},{"type":41,"tag":191,"props":5234,"children":5235},{"style":1240},[5236],{"type":47,"value":5237}," \u003Cenvelope.artifacts.inference_results_json>\n",{"type":41,"tag":191,"props":5239,"children":5240},{"class":193,"line":324},[5241,5246,5250],{"type":41,"tag":191,"props":5242,"children":5243},{"style":198},[5244],{"type":47,"value":5245},"    log",{"type":41,"tag":191,"props":5247,"children":5248},{"style":204},[5249],{"type":47,"value":178},{"type":41,"tag":191,"props":5251,"children":5252},{"style":1240},[5253],{"type":47,"value":5254}," \u003Cenvelope.artifacts.log>\n",{"type":41,"tag":191,"props":5256,"children":5257},{"class":193,"line":342},[5258,5263,5267],{"type":41,"tag":191,"props":5259,"children":5260},{"style":198},[5261],{"type":47,"value":5262},"    overall_accuracy_evalms",{"type":41,"tag":191,"props":5264,"children":5265},{"style":204},[5266],{"type":47,"value":178},{"type":41,"tag":191,"props":5268,"children":5269},{"style":1240},[5270],{"type":47,"value":5271}," \u003Cenvelope.headline_metrics.overall_accuracy>\n",{"type":41,"tag":191,"props":5273,"children":5274},{"class":193,"line":365},[5275,5280,5284,5289],{"type":41,"tag":191,"props":5276,"children":5277},{"style":198},[5278],{"type":47,"value":5279},"    overall_accuracy_authoritative",{"type":41,"tag":191,"props":5281,"children":5282},{"style":204},[5283],{"type":47,"value":178},{"type":41,"tag":191,"props":5285,"children":5286},{"style":204},[5287],{"type":47,"value":5288}," null",{"type":41,"tag":191,"props":5290,"children":5291},{"style":229},[5292],{"type":47,"value":5293},"   # filled by analyze_by_action_confusion in Step 8b\n",{"type":41,"tag":438,"props":5295,"children":5296},{},[5297,5319],{"type":41,"tag":442,"props":5298,"children":5299},{},[5300],{"type":41,"tag":446,"props":5301,"children":5302},{},[5303,5314],{"type":41,"tag":450,"props":5304,"children":5305},{},[5306,5308],{"type":47,"value":5307},"Envelope ",{"type":41,"tag":91,"props":5309,"children":5311},{"className":5310},[],[5312],{"type":47,"value":5313},"status",{"type":41,"tag":450,"props":5315,"children":5316},{},[5317],{"type":47,"value":5318},"Action",{"type":41,"tag":466,"props":5320,"children":5321},{},[5322,5377,5406],{"type":41,"tag":446,"props":5323,"children":5324},{},[5325,5334],{"type":41,"tag":473,"props":5326,"children":5327},{},[5328],{"type":41,"tag":91,"props":5329,"children":5331},{"className":5330},[],[5332],{"type":47,"value":5333},"completed",{"type":41,"tag":473,"props":5335,"children":5336},{},[5337,5339,5345,5346,5352,5354,5360,5362,5368,5370,5376],{"type":47,"value":5338},"Record ",{"type":41,"tag":91,"props":5340,"children":5342},{"className":5341},[],[5343],{"type":47,"value":5344},"envelope.headline_metrics.overall_accuracy",{"type":47,"value":1751},{"type":41,"tag":91,"props":5347,"children":5349},{"className":5348},[],[5350],{"type":47,"value":5351},"overall_accuracy_evalms",{"type":47,"value":5353},". Snapshot the job dir in Step 7c. Step 8b's ",{"type":41,"tag":91,"props":5355,"children":5357},{"className":5356},[],[5358],{"type":47,"value":5359},"analyze_by_action_confusion.py",{"type":47,"value":5361}," populates ",{"type":41,"tag":91,"props":5363,"children":5365},{"className":5364},[],[5366],{"type":47,"value":5367},"overall_accuracy_authoritative",{"type":47,"value":5369},"; Step 8a's success-criteria gate uses the authoritative value. Mark ",{"type":41,"tag":91,"props":5371,"children":5373},{"className":5372},[],[5374],{"type":47,"value":5375},"phase_status.eval_by_action: done",{"type":47,"value":136},{"type":41,"tag":446,"props":5378,"children":5379},{},[5380,5388],{"type":41,"tag":473,"props":5381,"children":5382},{},[5383],{"type":41,"tag":91,"props":5384,"children":5386},{"className":5385},[],[5387],{"type":47,"value":3618},{"type":41,"tag":473,"props":5389,"children":5390},{},[5391,5392,5398,5400,5405],{"type":47,"value":3625},{"type":41,"tag":91,"props":5393,"children":5395},{"className":5394},[],[5396],{"type":47,"value":5397},"\u003Chost_output_dir>\u002Flog.txt",{"type":47,"value":5399}," tail; fix root cause; rerun ",{"type":41,"tag":91,"props":5401,"children":5403},{"className":5402},[],[5404],{"type":47,"value":750},{"type":47,"value":136},{"type":41,"tag":446,"props":5407,"children":5408},{},[5409,5418],{"type":41,"tag":473,"props":5410,"children":5411},{},[5412],{"type":41,"tag":91,"props":5413,"children":5415},{"className":5414},[],[5416],{"type":47,"value":5417},"timeout",{"type":41,"tag":473,"props":5419,"children":5420},{},[5421,5423,5429],{"type":47,"value":5422},"Eval-ms job may still be running. ",{"type":41,"tag":91,"props":5424,"children":5426},{"className":5425},[],[5427],{"type":47,"value":5428},"curl http:\u002F\u002F\u003Ceval_host>:\u003Ceval_port>\u002Fapi\u002Fv1\u002Fevaluation\u002Fstatus\u002F\u003Ceval_job_id>",{"type":47,"value":5430}," to check before retrying.",{"type":41,"tag":138,"props":5432,"children":5434},{"id":5433},"_7b-e2e-evaluation",[5435],{"type":47,"value":5436},"7b. E2E Evaluation",{"type":41,"tag":61,"props":5438,"children":5439},{},[5440,5441,5447,5448,5457,5458,5464,5465,5470,5471,5476,5477,5483,5484,5489,5490,5496,5498,5503,5504,5509,5511,5517,5518,5523],{"type":47,"value":5009},{"type":41,"tag":91,"props":5442,"children":5444},{"className":5443},[],[5445],{"type":47,"value":5446},"inputs_e2e_iter\u003CN>.yaml",{"type":47,"value":2813},{"type":41,"tag":67,"props":5449,"children":5450},{},[5451,5452],{"type":47,"value":5021},{"type":41,"tag":91,"props":5453,"children":5455},{"className":5454},[],[5456],{"type":47,"value":1691},{"type":47,"value":4866},{"type":41,"tag":91,"props":5459,"children":5461},{"className":5460},[],[5462],{"type":47,"value":5463},"${SKILL_DIR}\u002Freferences\u002Fe2e-eval-template.yaml",{"type":47,"value":5035},{"type":41,"tag":91,"props":5466,"children":5468},{"className":5467},[],[5469],{"type":47,"value":5041},{"type":47,"value":655},{"type":41,"tag":91,"props":5472,"children":5474},{"className":5473},[],[5475],{"type":47,"value":5057},{"type":47,"value":655},{"type":41,"tag":91,"props":5478,"children":5480},{"className":5479},[],[5481],{"type":47,"value":5482},"ddm_training_job_id",{"type":47,"value":655},{"type":41,"tag":91,"props":5485,"children":5487},{"className":5486},[],[5488],{"type":47,"value":5064},{"type":47,"value":5066},{"type":41,"tag":91,"props":5491,"children":5493},{"className":5492},[],[5494],{"type":47,"value":5495},"score_threshold = run_state.ddm_threshold",{"type":47,"value":5497},". Pass ",{"type":41,"tag":91,"props":5499,"children":5501},{"className":5500},[],[5502],{"type":47,"value":4857},{"type":47,"value":2367},{"type":41,"tag":91,"props":5505,"children":5507},{"className":5506},[],[5508],{"type":47,"value":4864},{"type":47,"value":5510}," through ",{"type":41,"tag":91,"props":5512,"children":5514},{"className":5513},[],[5515],{"type":47,"value":5516},"resolution_config",{"type":47,"value":1444},{"type":41,"tag":91,"props":5519,"children":5521},{"className":5520},[],[5522],{"type":47,"value":4850},{"type":47,"value":5524}," at the top level.",{"type":41,"tag":61,"props":5526,"children":5527},{},[5528,5529,5535,5536,5545],{"type":47,"value":2879},{"type":41,"tag":91,"props":5530,"children":5532},{"className":5531},[],[5533],{"type":47,"value":5534},"phase_status.eval_e2e: in_progress",{"type":47,"value":2492},{"type":41,"tag":67,"props":5537,"children":5538},{},[5539,5540],{"type":47,"value":2897},{"type":41,"tag":91,"props":5541,"children":5543},{"className":5542},[],[5544],{"type":47,"value":780},{"type":47,"value":136},{"type":41,"tag":61,"props":5547,"children":5548},{},[5549,5554,5556,5562],{"type":41,"tag":67,"props":5550,"children":5551},{},[5552],{"type":47,"value":5553},"Capture the JSON envelope",{"type":47,"value":5555}," and persist into ",{"type":41,"tag":91,"props":5557,"children":5559},{"className":5558},[],[5560],{"type":47,"value":5561},"run_state.eval_outputs.e2e",{"type":47,"value":178},{"type":41,"tag":180,"props":5564,"children":5566},{"className":182,"code":5565,"language":184,"meta":185,"style":185},"eval_outputs:\n  e2e:\n    eval_job_id: \u003Cenvelope.eval_job_id>\n    host_output_dir: \u003Cenvelope.host_output_dir>\n    snapshot_dir: \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e             # full copy made in Step 7c\n    e2e_results_json: \u003Cenvelope.artifacts.e2e_results_json>\n    accuracy_json: \u003Cenvelope.artifacts.accuracy_json>\n    video_name_to_output_text_json: \u003Cenvelope.artifacts.video_name_to_output_text_json>\n    action_recognition_log: \u003Cenvelope.artifacts.action_recognition_log>\n    temporal_segmentation_dir: \u003Cenvelope.artifacts.temporal_segmentation_dir>\n    temporal_segmentation_log: \u003Cenvelope.artifacts.temporal_segmentation_log>\n    sop_e2e_eval_log: \u003Cenvelope.artifacts.sop_e2e_eval_log>\n    log: \u003Cenvelope.artifacts.log>\n",[5567],{"type":41,"tag":91,"props":5568,"children":5569},{"__ignoreMap":185},[5570,5581,5593,5608,5623,5644,5661,5678,5695,5712,5729,5746,5763],{"type":41,"tag":191,"props":5571,"children":5572},{"class":193,"line":194},[5573,5577],{"type":41,"tag":191,"props":5574,"children":5575},{"style":198},[5576],{"type":47,"value":5148},{"type":41,"tag":191,"props":5578,"children":5579},{"style":204},[5580],{"type":47,"value":207},{"type":41,"tag":191,"props":5582,"children":5583},{"class":193,"line":210},[5584,5589],{"type":41,"tag":191,"props":5585,"children":5586},{"style":198},[5587],{"type":47,"value":5588},"  e2e",{"type":41,"tag":191,"props":5590,"children":5591},{"style":204},[5592],{"type":47,"value":207},{"type":41,"tag":191,"props":5594,"children":5595},{"class":193,"line":235},[5596,5600,5604],{"type":41,"tag":191,"props":5597,"children":5598},{"style":198},[5599],{"type":47,"value":5172},{"type":41,"tag":191,"props":5601,"children":5602},{"style":204},[5603],{"type":47,"value":178},{"type":41,"tag":191,"props":5605,"children":5606},{"style":1240},[5607],{"type":47,"value":5181},{"type":41,"tag":191,"props":5609,"children":5610},{"class":193,"line":258},[5611,5615,5619],{"type":41,"tag":191,"props":5612,"children":5613},{"style":198},[5614],{"type":47,"value":5189},{"type":41,"tag":191,"props":5616,"children":5617},{"style":204},[5618],{"type":47,"value":178},{"type":41,"tag":191,"props":5620,"children":5621},{"style":1240},[5622],{"type":47,"value":5198},{"type":41,"tag":191,"props":5624,"children":5625},{"class":193,"line":280},[5626,5630,5634,5639],{"type":41,"tag":191,"props":5627,"children":5628},{"style":198},[5629],{"type":47,"value":5206},{"type":41,"tag":191,"props":5631,"children":5632},{"style":204},[5633],{"type":47,"value":178},{"type":41,"tag":191,"props":5635,"children":5636},{"style":1240},[5637],{"type":47,"value":5638}," \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e",{"type":41,"tag":191,"props":5640,"children":5641},{"style":229},[5642],{"type":47,"value":5643},"             # full copy made in Step 7c\n",{"type":41,"tag":191,"props":5645,"children":5646},{"class":193,"line":302},[5647,5652,5656],{"type":41,"tag":191,"props":5648,"children":5649},{"style":198},[5650],{"type":47,"value":5651},"    e2e_results_json",{"type":41,"tag":191,"props":5653,"children":5654},{"style":204},[5655],{"type":47,"value":178},{"type":41,"tag":191,"props":5657,"children":5658},{"style":1240},[5659],{"type":47,"value":5660}," \u003Cenvelope.artifacts.e2e_results_json>\n",{"type":41,"tag":191,"props":5662,"children":5663},{"class":193,"line":324},[5664,5669,5673],{"type":41,"tag":191,"props":5665,"children":5666},{"style":198},[5667],{"type":47,"value":5668},"    accuracy_json",{"type":41,"tag":191,"props":5670,"children":5671},{"style":204},[5672],{"type":47,"value":178},{"type":41,"tag":191,"props":5674,"children":5675},{"style":1240},[5676],{"type":47,"value":5677}," \u003Cenvelope.artifacts.accuracy_json>\n",{"type":41,"tag":191,"props":5679,"children":5680},{"class":193,"line":342},[5681,5686,5690],{"type":41,"tag":191,"props":5682,"children":5683},{"style":198},[5684],{"type":47,"value":5685},"    video_name_to_output_text_json",{"type":41,"tag":191,"props":5687,"children":5688},{"style":204},[5689],{"type":47,"value":178},{"type":41,"tag":191,"props":5691,"children":5692},{"style":1240},[5693],{"type":47,"value":5694}," \u003Cenvelope.artifacts.video_name_to_output_text_json>\n",{"type":41,"tag":191,"props":5696,"children":5697},{"class":193,"line":365},[5698,5703,5707],{"type":41,"tag":191,"props":5699,"children":5700},{"style":198},[5701],{"type":47,"value":5702},"    action_recognition_log",{"type":41,"tag":191,"props":5704,"children":5705},{"style":204},[5706],{"type":47,"value":178},{"type":41,"tag":191,"props":5708,"children":5709},{"style":1240},[5710],{"type":47,"value":5711}," \u003Cenvelope.artifacts.action_recognition_log>\n",{"type":41,"tag":191,"props":5713,"children":5714},{"class":193,"line":387},[5715,5720,5724],{"type":41,"tag":191,"props":5716,"children":5717},{"style":198},[5718],{"type":47,"value":5719},"    temporal_segmentation_dir",{"type":41,"tag":191,"props":5721,"children":5722},{"style":204},[5723],{"type":47,"value":178},{"type":41,"tag":191,"props":5725,"children":5726},{"style":1240},[5727],{"type":47,"value":5728}," \u003Cenvelope.artifacts.temporal_segmentation_dir>\n",{"type":41,"tag":191,"props":5730,"children":5731},{"class":193,"line":409},[5732,5737,5741],{"type":41,"tag":191,"props":5733,"children":5734},{"style":198},[5735],{"type":47,"value":5736},"    temporal_segmentation_log",{"type":41,"tag":191,"props":5738,"children":5739},{"style":204},[5740],{"type":47,"value":178},{"type":41,"tag":191,"props":5742,"children":5743},{"style":1240},[5744],{"type":47,"value":5745}," \u003Cenvelope.artifacts.temporal_segmentation_log>\n",{"type":41,"tag":191,"props":5747,"children":5748},{"class":193,"line":27},[5749,5754,5758],{"type":41,"tag":191,"props":5750,"children":5751},{"style":198},[5752],{"type":47,"value":5753},"    sop_e2e_eval_log",{"type":41,"tag":191,"props":5755,"children":5756},{"style":204},[5757],{"type":47,"value":178},{"type":41,"tag":191,"props":5759,"children":5760},{"style":1240},[5761],{"type":47,"value":5762}," \u003Cenvelope.artifacts.sop_e2e_eval_log>\n",{"type":41,"tag":191,"props":5764,"children":5766},{"class":193,"line":5765},13,[5767,5771,5775],{"type":41,"tag":191,"props":5768,"children":5769},{"style":198},[5770],{"type":47,"value":5245},{"type":41,"tag":191,"props":5772,"children":5773},{"style":204},[5774],{"type":47,"value":178},{"type":41,"tag":191,"props":5776,"children":5777},{"style":1240},[5778],{"type":47,"value":5254},{"type":41,"tag":438,"props":5780,"children":5781},{},[5782,5801],{"type":41,"tag":442,"props":5783,"children":5784},{},[5785],{"type":41,"tag":446,"props":5786,"children":5787},{},[5788,5797],{"type":41,"tag":450,"props":5789,"children":5790},{},[5791,5792],{"type":47,"value":5307},{"type":41,"tag":91,"props":5793,"children":5795},{"className":5794},[],[5796],{"type":47,"value":5313},{"type":41,"tag":450,"props":5798,"children":5799},{},[5800],{"type":47,"value":5318},{"type":41,"tag":466,"props":5802,"children":5803},{},[5804,5885,5908],{"type":41,"tag":446,"props":5805,"children":5806},{},[5807,5815],{"type":41,"tag":473,"props":5808,"children":5809},{},[5810],{"type":41,"tag":91,"props":5811,"children":5813},{"className":5812},[],[5814],{"type":47,"value":5333},{"type":41,"tag":473,"props":5816,"children":5817},{},[5818,5819,5825,5827,5833,5834,5840,5841,5847,5848,5854,5855,5861,5863,5869,5870,5876,5878,5884],{"type":47,"value":3625},{"type":41,"tag":91,"props":5820,"children":5822},{"className":5821},[],[5823],{"type":47,"value":5824},"\u003Caccuracy_json>",{"type":47,"value":5826}," for ",{"type":41,"tag":91,"props":5828,"children":5830},{"className":5829},[],[5831],{"type":47,"value":5832},"sequence_accuracy",{"type":47,"value":2367},{"type":41,"tag":91,"props":5835,"children":5837},{"className":5836},[],[5838],{"type":47,"value":5839},"action_accuracy",{"type":47,"value":2367},{"type":41,"tag":91,"props":5842,"children":5844},{"className":5843},[],[5845],{"type":47,"value":5846},"wrong",{"type":47,"value":2367},{"type":41,"tag":91,"props":5849,"children":5851},{"className":5850},[],[5852],{"type":47,"value":5853},"duplicate",{"type":47,"value":2367},{"type":41,"tag":91,"props":5856,"children":5858},{"className":5857},[],[5859],{"type":47,"value":5860},"missing",{"type":47,"value":5862},"; read ",{"type":41,"tag":91,"props":5864,"children":5866},{"className":5865},[],[5867],{"type":47,"value":5868},"\u003Ce2e_results_json>.temporal_segmentation.avg_f1",{"type":47,"value":5826},{"type":41,"tag":91,"props":5871,"children":5873},{"className":5872},[],[5874],{"type":47,"value":5875},"ddm_f1",{"type":47,"value":5877},". Mark ",{"type":41,"tag":91,"props":5879,"children":5881},{"className":5880},[],[5882],{"type":47,"value":5883},"phase_status.eval_e2e: done",{"type":47,"value":136},{"type":41,"tag":446,"props":5886,"children":5887},{},[5888,5896],{"type":41,"tag":473,"props":5889,"children":5890},{},[5891],{"type":41,"tag":91,"props":5892,"children":5894},{"className":5893},[],[5895],{"type":47,"value":3618},{"type":41,"tag":473,"props":5897,"children":5898},{},[5899,5900,5906],{"type":47,"value":3625},{"type":41,"tag":91,"props":5901,"children":5903},{"className":5902},[],[5904],{"type":47,"value":5905},"\u003Csop_e2e_eval_log>",{"type":47,"value":5907}," tail; fix root cause; rerun.",{"type":41,"tag":446,"props":5909,"children":5910},{},[5911,5919],{"type":41,"tag":473,"props":5912,"children":5913},{},[5914],{"type":41,"tag":91,"props":5915,"children":5917},{"className":5916},[],[5918],{"type":47,"value":5417},{"type":41,"tag":473,"props":5920,"children":5921},{},[5922,5924,5930],{"type":47,"value":5923},"Same as 7a — query ",{"type":41,"tag":91,"props":5925,"children":5927},{"className":5926},[],[5928],{"type":47,"value":5929},"\u002Fapi\u002Fv1\u002Fe2e-evaluation\u002Fstatus\u002F\u003Ceval_job_id>",{"type":47,"value":5931}," before retry.",{"type":41,"tag":61,"props":5933,"children":5934},{},[5935,5940],{"type":41,"tag":67,"props":5936,"children":5937},{},[5938],{"type":47,"value":5939},"No file-existence polling, no watchdog scripts.",{"type":47,"value":5941}," The eval skill blocks until terminal status and returns the envelope.",{"type":41,"tag":138,"props":5943,"children":5945},{"id":5944},"_7c-record-results",[5946],{"type":47,"value":5947},"7c. Record Results",{"type":41,"tag":61,"props":5949,"children":5950},{},[5951,5961,5963,5968],{"type":41,"tag":67,"props":5952,"children":5953},{},[5954,5956],{"type":47,"value":5955},"Snapshot the eval job output(s) into ",{"type":41,"tag":91,"props":5957,"children":5959},{"className":5958},[],[5960],{"type":47,"value":1691},{"type":47,"value":5962},". For each eval run this iteration, full-copy its job dir from the envelope's\n",{"type":41,"tag":91,"props":5964,"children":5966},{"className":5965},[],[5967],{"type":47,"value":1578},{"type":47,"value":178},{"type":41,"tag":180,"props":5970,"children":5972},{"className":1217,"code":5971,"language":1219,"meta":185,"style":185},"# by-action (if run this iter)\nmkdir -p \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action && cp -a \u003Ceval_outputs.by_action.host_output_dir>\u002F. \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002F\n# e2e (if run this iter)\nmkdir -p \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e        && cp -a \u003Ceval_outputs.e2e.host_output_dir>\u002F.        \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002F\n",[5973],{"type":41,"tag":91,"props":5974,"children":5975},{"__ignoreMap":185},[5976,5984,6111,6119],{"type":41,"tag":191,"props":5977,"children":5978},{"class":193,"line":194},[5979],{"type":41,"tag":191,"props":5980,"children":5981},{"style":229},[5982],{"type":47,"value":5983},"# by-action (if run this iter)\n",{"type":41,"tag":191,"props":5985,"children":5986},{"class":193,"line":210},[5987,5992,5997,6001,6005,6009,6013,6018,6023,6028,6032,6037,6042,6047,6052,6056,6061,6065,6069,6074,6078,6082,6086,6090,6094,6098,6102,6106],{"type":41,"tag":191,"props":5988,"children":5989},{"style":1229},[5990],{"type":47,"value":5991},"mkdir",{"type":41,"tag":191,"props":5993,"children":5994},{"style":1240},[5995],{"type":47,"value":5996}," -p",{"type":41,"tag":191,"props":5998,"children":5999},{"style":204},[6000],{"type":47,"value":1237},{"type":41,"tag":191,"props":6002,"children":6003},{"style":1240},[6004],{"type":47,"value":2019},{"type":41,"tag":191,"props":6006,"children":6007},{"style":1246},[6008],{"type":47,"value":1249},{"type":41,"tag":191,"props":6010,"children":6011},{"style":204},[6012],{"type":47,"value":1254},{"type":41,"tag":191,"props":6014,"children":6015},{"style":1240},[6016],{"type":47,"value":6017},"\u002Fiter",{"type":41,"tag":191,"props":6019,"children":6020},{"style":204},[6021],{"type":47,"value":6022},"\u003C",{"type":41,"tag":191,"props":6024,"children":6025},{"style":1246},[6026],{"type":47,"value":6027},"N",{"type":41,"tag":191,"props":6029,"children":6030},{"style":204},[6031],{"type":47,"value":1254},{"type":41,"tag":191,"props":6033,"children":6034},{"style":1240},[6035],{"type":47,"value":6036},"\u002Fby_action",{"type":41,"tag":191,"props":6038,"children":6039},{"style":204},[6040],{"type":47,"value":6041}," &&",{"type":41,"tag":191,"props":6043,"children":6044},{"style":1229},[6045],{"type":47,"value":6046}," cp",{"type":41,"tag":191,"props":6048,"children":6049},{"style":1240},[6050],{"type":47,"value":6051}," -a",{"type":41,"tag":191,"props":6053,"children":6054},{"style":204},[6055],{"type":47,"value":1237},{"type":41,"tag":191,"props":6057,"children":6058},{"style":1240},[6059],{"type":47,"value":6060},"eval_outputs.by_action.host_output_di",{"type":41,"tag":191,"props":6062,"children":6063},{"style":1246},[6064],{"type":47,"value":1249},{"type":41,"tag":191,"props":6066,"children":6067},{"style":204},[6068],{"type":47,"value":1254},{"type":41,"tag":191,"props":6070,"children":6071},{"style":1240},[6072],{"type":47,"value":6073},"\u002F.",{"type":41,"tag":191,"props":6075,"children":6076},{"style":204},[6077],{"type":47,"value":1237},{"type":41,"tag":191,"props":6079,"children":6080},{"style":1240},[6081],{"type":47,"value":2019},{"type":41,"tag":191,"props":6083,"children":6084},{"style":1246},[6085],{"type":47,"value":1249},{"type":41,"tag":191,"props":6087,"children":6088},{"style":204},[6089],{"type":47,"value":1254},{"type":41,"tag":191,"props":6091,"children":6092},{"style":1240},[6093],{"type":47,"value":6017},{"type":41,"tag":191,"props":6095,"children":6096},{"style":204},[6097],{"type":47,"value":6022},{"type":41,"tag":191,"props":6099,"children":6100},{"style":1246},[6101],{"type":47,"value":6027},{"type":41,"tag":191,"props":6103,"children":6104},{"style":204},[6105],{"type":47,"value":1254},{"type":41,"tag":191,"props":6107,"children":6108},{"style":1240},[6109],{"type":47,"value":6110},"\u002Fby_action\u002F\n",{"type":41,"tag":191,"props":6112,"children":6113},{"class":193,"line":235},[6114],{"type":41,"tag":191,"props":6115,"children":6116},{"style":229},[6117],{"type":47,"value":6118},"# e2e (if run this iter)\n",{"type":41,"tag":191,"props":6120,"children":6121},{"class":193,"line":258},[6122,6126,6130,6134,6138,6142,6146,6150,6154,6158,6162,6167,6172,6176,6180,6184,6189,6193,6197,6201,6206,6210,6214,6218,6222,6226,6230,6234],{"type":41,"tag":191,"props":6123,"children":6124},{"style":1229},[6125],{"type":47,"value":5991},{"type":41,"tag":191,"props":6127,"children":6128},{"style":1240},[6129],{"type":47,"value":5996},{"type":41,"tag":191,"props":6131,"children":6132},{"style":204},[6133],{"type":47,"value":1237},{"type":41,"tag":191,"props":6135,"children":6136},{"style":1240},[6137],{"type":47,"value":2019},{"type":41,"tag":191,"props":6139,"children":6140},{"style":1246},[6141],{"type":47,"value":1249},{"type":41,"tag":191,"props":6143,"children":6144},{"style":204},[6145],{"type":47,"value":1254},{"type":41,"tag":191,"props":6147,"children":6148},{"style":1240},[6149],{"type":47,"value":6017},{"type":41,"tag":191,"props":6151,"children":6152},{"style":204},[6153],{"type":47,"value":6022},{"type":41,"tag":191,"props":6155,"children":6156},{"style":1246},[6157],{"type":47,"value":6027},{"type":41,"tag":191,"props":6159,"children":6160},{"style":204},[6161],{"type":47,"value":1254},{"type":41,"tag":191,"props":6163,"children":6164},{"style":1240},[6165],{"type":47,"value":6166},"\u002Fe2e",{"type":41,"tag":191,"props":6168,"children":6169},{"style":204},[6170],{"type":47,"value":6171},"        &&",{"type":41,"tag":191,"props":6173,"children":6174},{"style":1229},[6175],{"type":47,"value":6046},{"type":41,"tag":191,"props":6177,"children":6178},{"style":1240},[6179],{"type":47,"value":6051},{"type":41,"tag":191,"props":6181,"children":6182},{"style":204},[6183],{"type":47,"value":1237},{"type":41,"tag":191,"props":6185,"children":6186},{"style":1240},[6187],{"type":47,"value":6188},"eval_outputs.e2e.host_output_di",{"type":41,"tag":191,"props":6190,"children":6191},{"style":1246},[6192],{"type":47,"value":1249},{"type":41,"tag":191,"props":6194,"children":6195},{"style":204},[6196],{"type":47,"value":1254},{"type":41,"tag":191,"props":6198,"children":6199},{"style":1240},[6200],{"type":47,"value":6073},{"type":41,"tag":191,"props":6202,"children":6203},{"style":204},[6204],{"type":47,"value":6205},"        \u003C",{"type":41,"tag":191,"props":6207,"children":6208},{"style":1240},[6209],{"type":47,"value":2019},{"type":41,"tag":191,"props":6211,"children":6212},{"style":1246},[6213],{"type":47,"value":1249},{"type":41,"tag":191,"props":6215,"children":6216},{"style":204},[6217],{"type":47,"value":1254},{"type":41,"tag":191,"props":6219,"children":6220},{"style":1240},[6221],{"type":47,"value":6017},{"type":41,"tag":191,"props":6223,"children":6224},{"style":204},[6225],{"type":47,"value":6022},{"type":41,"tag":191,"props":6227,"children":6228},{"style":1246},[6229],{"type":47,"value":6027},{"type":41,"tag":191,"props":6231,"children":6232},{"style":204},[6233],{"type":47,"value":1254},{"type":41,"tag":191,"props":6235,"children":6236},{"style":1240},[6237],{"type":47,"value":6238},"\u002Fe2e\u002F\n",{"type":41,"tag":61,"props":6240,"children":6241},{},[6242,6254,6255,6260],{"type":41,"tag":67,"props":6243,"children":6244},{},[6245,6247,6252],{"type":47,"value":6246},"Append ",{"type":41,"tag":91,"props":6248,"children":6250},{"className":6249},[],[6251],{"type":47,"value":2268},{"type":47,"value":6253}," entry",{"type":47,"value":3772},{"type":41,"tag":91,"props":6256,"children":6258},{"className":6257},[],[6259],{"type":47,"value":104},{"type":47,"value":178},{"type":41,"tag":180,"props":6262,"children":6264},{"className":182,"code":6263,"language":184,"meta":185,"style":185},"eval_history:\n  - iteration: N\n    by_action_acc: 0.XX\n    e2e_action_acc: 0.XX\n    e2e_seq_acc: 0.XX\n    ddm_f1: 0.XX\n    ddm_threshold: 0.XX\n    changes_applied: [\"description of what changed vs prev iteration\"]\n",[6265],{"type":41,"tag":91,"props":6266,"children":6267},{"__ignoreMap":185},[6268,6279,6301,6318,6334,6350,6366,6382],{"type":41,"tag":191,"props":6269,"children":6270},{"class":193,"line":194},[6271,6275],{"type":41,"tag":191,"props":6272,"children":6273},{"style":198},[6274],{"type":47,"value":2268},{"type":41,"tag":191,"props":6276,"children":6277},{"style":204},[6278],{"type":47,"value":207},{"type":41,"tag":191,"props":6280,"children":6281},{"class":193,"line":210},[6282,6287,6292,6296],{"type":41,"tag":191,"props":6283,"children":6284},{"style":204},[6285],{"type":47,"value":6286},"  -",{"type":41,"tag":191,"props":6288,"children":6289},{"style":198},[6290],{"type":47,"value":6291}," iteration",{"type":41,"tag":191,"props":6293,"children":6294},{"style":204},[6295],{"type":47,"value":178},{"type":41,"tag":191,"props":6297,"children":6298},{"style":2604},[6299],{"type":47,"value":6300}," N\n",{"type":41,"tag":191,"props":6302,"children":6303},{"class":193,"line":235},[6304,6309,6313],{"type":41,"tag":191,"props":6305,"children":6306},{"style":198},[6307],{"type":47,"value":6308},"    by_action_acc",{"type":41,"tag":191,"props":6310,"children":6311},{"style":204},[6312],{"type":47,"value":178},{"type":41,"tag":191,"props":6314,"children":6315},{"style":1240},[6316],{"type":47,"value":6317}," 0.XX\n",{"type":41,"tag":191,"props":6319,"children":6320},{"class":193,"line":258},[6321,6326,6330],{"type":41,"tag":191,"props":6322,"children":6323},{"style":198},[6324],{"type":47,"value":6325},"    e2e_action_acc",{"type":41,"tag":191,"props":6327,"children":6328},{"style":204},[6329],{"type":47,"value":178},{"type":41,"tag":191,"props":6331,"children":6332},{"style":1240},[6333],{"type":47,"value":6317},{"type":41,"tag":191,"props":6335,"children":6336},{"class":193,"line":280},[6337,6342,6346],{"type":41,"tag":191,"props":6338,"children":6339},{"style":198},[6340],{"type":47,"value":6341},"    e2e_seq_acc",{"type":41,"tag":191,"props":6343,"children":6344},{"style":204},[6345],{"type":47,"value":178},{"type":41,"tag":191,"props":6347,"children":6348},{"style":1240},[6349],{"type":47,"value":6317},{"type":41,"tag":191,"props":6351,"children":6352},{"class":193,"line":302},[6353,6358,6362],{"type":41,"tag":191,"props":6354,"children":6355},{"style":198},[6356],{"type":47,"value":6357},"    ddm_f1",{"type":41,"tag":191,"props":6359,"children":6360},{"style":204},[6361],{"type":47,"value":178},{"type":41,"tag":191,"props":6363,"children":6364},{"style":1240},[6365],{"type":47,"value":6317},{"type":41,"tag":191,"props":6367,"children":6368},{"class":193,"line":324},[6369,6374,6378],{"type":41,"tag":191,"props":6370,"children":6371},{"style":198},[6372],{"type":47,"value":6373},"    ddm_threshold",{"type":41,"tag":191,"props":6375,"children":6376},{"style":204},[6377],{"type":47,"value":178},{"type":41,"tag":191,"props":6379,"children":6380},{"style":1240},[6381],{"type":47,"value":6317},{"type":41,"tag":191,"props":6383,"children":6384},{"class":193,"line":342},[6385,6390,6394,6399,6403,6408,6412],{"type":41,"tag":191,"props":6386,"children":6387},{"style":198},[6388],{"type":47,"value":6389},"    changes_applied",{"type":41,"tag":191,"props":6391,"children":6392},{"style":204},[6393],{"type":47,"value":178},{"type":41,"tag":191,"props":6395,"children":6396},{"style":204},[6397],{"type":47,"value":6398}," [",{"type":41,"tag":191,"props":6400,"children":6401},{"style":204},[6402],{"type":47,"value":2634},{"type":41,"tag":191,"props":6404,"children":6405},{"style":1240},[6406],{"type":47,"value":6407},"description of what changed vs prev iteration",{"type":41,"tag":191,"props":6409,"children":6410},{"style":204},[6411],{"type":47,"value":2634},{"type":41,"tag":191,"props":6413,"children":6414},{"style":204},[6415],{"type":47,"value":6416},"]\n",{"type":41,"tag":61,"props":6418,"children":6419},{},[6420,6425,6427,6433],{"type":41,"tag":67,"props":6421,"children":6422},{},[6423],{"type":47,"value":6424},"Write progress chart",{"type":47,"value":6426}," — every eval, generate ",{"type":41,"tag":91,"props":6428,"children":6430},{"className":6429},[],[6431],{"type":47,"value":6432},"\u003Crun_dir>\u002Fprogress.html",{"type":47,"value":178},{"type":41,"tag":180,"props":6435,"children":6439},{"className":6436,"code":6437,"language":6438,"meta":185,"style":185},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import pathlib, json\ntmpl = pathlib.Path('${SKILL_DIR}\u002Freferences\u002Fprogress-chart-template.html').read_text()\ndata = 'const RUN=' + json.dumps({\n  'id': '\u003Crun_id>', 'dataset': '\u003Cdataset_name>', 'target': \u003Cseq_target_as_pct_0to100>,\n  'iters': [\n    # one entry per completed eval — all accuracy fields are 0-100 (not 0-1)\n    # {'n':'1','ph':'I','t':'first','ba':18.2,'ea':33.3,'sq':0,'f1':0.848,'th':0.60,'d':7,'w':11,'m':6,'lr':'1.5e-5','note':'Baseline'},\n  ]\n}) + ';'\npathlib.Path('\u003Crun_dir>\u002Fprogress.html').write_text(tmpl.replace('\u002F* ITER_DATA *\u002F', data))\n","python",[6440],{"type":41,"tag":91,"props":6441,"children":6442},{"__ignoreMap":185},[6443,6451,6459,6467,6475,6483,6491,6499,6507,6515],{"type":41,"tag":191,"props":6444,"children":6445},{"class":193,"line":194},[6446],{"type":41,"tag":191,"props":6447,"children":6448},{},[6449],{"type":47,"value":6450},"import pathlib, json\n",{"type":41,"tag":191,"props":6452,"children":6453},{"class":193,"line":210},[6454],{"type":41,"tag":191,"props":6455,"children":6456},{},[6457],{"type":47,"value":6458},"tmpl = pathlib.Path('${SKILL_DIR}\u002Freferences\u002Fprogress-chart-template.html').read_text()\n",{"type":41,"tag":191,"props":6460,"children":6461},{"class":193,"line":235},[6462],{"type":41,"tag":191,"props":6463,"children":6464},{},[6465],{"type":47,"value":6466},"data = 'const RUN=' + json.dumps({\n",{"type":41,"tag":191,"props":6468,"children":6469},{"class":193,"line":258},[6470],{"type":41,"tag":191,"props":6471,"children":6472},{},[6473],{"type":47,"value":6474},"  'id': '\u003Crun_id>', 'dataset': '\u003Cdataset_name>', 'target': \u003Cseq_target_as_pct_0to100>,\n",{"type":41,"tag":191,"props":6476,"children":6477},{"class":193,"line":280},[6478],{"type":41,"tag":191,"props":6479,"children":6480},{},[6481],{"type":47,"value":6482},"  'iters': [\n",{"type":41,"tag":191,"props":6484,"children":6485},{"class":193,"line":302},[6486],{"type":41,"tag":191,"props":6487,"children":6488},{},[6489],{"type":47,"value":6490},"    # one entry per completed eval — all accuracy fields are 0-100 (not 0-1)\n",{"type":41,"tag":191,"props":6492,"children":6493},{"class":193,"line":324},[6494],{"type":41,"tag":191,"props":6495,"children":6496},{},[6497],{"type":47,"value":6498},"    # {'n':'1','ph':'I','t':'first','ba':18.2,'ea':33.3,'sq':0,'f1':0.848,'th':0.60,'d':7,'w':11,'m':6,'lr':'1.5e-5','note':'Baseline'},\n",{"type":41,"tag":191,"props":6500,"children":6501},{"class":193,"line":342},[6502],{"type":41,"tag":191,"props":6503,"children":6504},{},[6505],{"type":47,"value":6506},"  ]\n",{"type":41,"tag":191,"props":6508,"children":6509},{"class":193,"line":365},[6510],{"type":41,"tag":191,"props":6511,"children":6512},{},[6513],{"type":47,"value":6514},"}) + ';'\n",{"type":41,"tag":191,"props":6516,"children":6517},{"class":193,"line":387},[6518],{"type":41,"tag":191,"props":6519,"children":6520},{},[6521],{"type":47,"value":6522},"pathlib.Path('\u003Crun_dir>\u002Fprogress.html').write_text(tmpl.replace('\u002F* ITER_DATA *\u002F', data))\n",{"type":41,"tag":61,"props":6524,"children":6525},{},[6526,6528,6534,6536,6542,6544,6550,6552,6558,6560,6566,6568,6574,6576,6582,6584,6589,6591,6597,6599,6605,6607,6613,6615,6621,6623,6629,6631,6637],{"type":47,"value":6527},"Schema: ",{"type":41,"tag":91,"props":6529,"children":6531},{"className":6530},[],[6532],{"type":47,"value":6533},"n",{"type":47,"value":6535},"=label, ",{"type":41,"tag":91,"props":6537,"children":6539},{"className":6538},[],[6540],{"type":47,"value":6541},"ph",{"type":47,"value":6543},"=I\u002FII\u002FIII (I=pre-key-fix, II=key-fix-iter, III=post-fix), ",{"type":41,"tag":91,"props":6545,"children":6547},{"className":6546},[],[6548],{"type":47,"value":6549},"t",{"type":47,"value":6551},"=first\u002FaugVLM\u002Fvlm\u002Fddm\u002Feval, ",{"type":41,"tag":91,"props":6553,"children":6555},{"className":6554},[],[6556],{"type":47,"value":6557},"ba",{"type":47,"value":6559},"=by-action%(null if not run), ",{"type":41,"tag":91,"props":6561,"children":6563},{"className":6562},[],[6564],{"type":47,"value":6565},"ea",{"type":47,"value":6567},"=E2E-act%, ",{"type":41,"tag":91,"props":6569,"children":6571},{"className":6570},[],[6572],{"type":47,"value":6573},"sq",{"type":47,"value":6575},"=seq%, ",{"type":41,"tag":91,"props":6577,"children":6579},{"className":6578},[],[6580],{"type":47,"value":6581},"f1",{"type":47,"value":6583},"=DDM-F1, ",{"type":41,"tag":91,"props":6585,"children":6587},{"className":6586},[],[6588],{"type":47,"value":450},{"type":47,"value":6590},"=DDM-thr, ",{"type":41,"tag":91,"props":6592,"children":6594},{"className":6593},[],[6595],{"type":47,"value":6596},"d\u002Fw\u002Fm",{"type":47,"value":6598},"=dup\u002Fwrong\u002Fmiss(int), ",{"type":41,"tag":91,"props":6600,"children":6602},{"className":6601},[],[6603],{"type":47,"value":6604},"lr",{"type":47,"value":6606},"=LR-string, ",{"type":41,"tag":91,"props":6608,"children":6610},{"className":6609},[],[6611],{"type":47,"value":6612},"note",{"type":47,"value":6614},"=one-line change, ",{"type":41,"tag":91,"props":6616,"children":6618},{"className":6617},[],[6619],{"type":47,"value":6620},"samp",{"type":47,"value":6622},"=total QA samples (training iters only; omit or 0 for eval-only), ",{"type":41,"tag":91,"props":6624,"children":6626},{"className":6625},[],[6627],{"type":47,"value":6628},"qas",{"type":47,"value":6630},"=object with per-type counts ",{"type":41,"tag":91,"props":6632,"children":6634},{"className":6633},[],[6635],{"type":47,"value":6636},"{bcq,mcq,gqa,gqas,dmcq}",{"type":47,"value":6638}," (omit for eval-only iters).",{"type":41,"tag":61,"props":6640,"children":6641},{},[6642,6644,6649,6651,6656,6658,6664],{"type":47,"value":6643},"This is a ",{"type":41,"tag":67,"props":6645,"children":6646},{},[6647],{"type":47,"value":6648},"mandatory local-file write",{"type":47,"value":6650},". One row per eval (eval-only sweeps included — same as\n",{"type":41,"tag":91,"props":6652,"children":6654},{"className":6653},[],[6655],{"type":47,"value":2268},{"type":47,"value":6657},"). After writing, confirm with ",{"type":41,"tag":91,"props":6659,"children":6661},{"className":6660},[],[6662],{"type":47,"value":6663},"=== PROGRESS (local file): \u003Crun_dir>\u002Fprogress.html ===",{"type":47,"value":136},{"type":41,"tag":802,"props":6666,"children":6667},{},[],{"type":41,"tag":50,"props":6669,"children":6671},{"id":6670},"step-8-phase-6-rca-decision-loop",[6672],{"type":47,"value":6673},"Step 8: Phase 6 — RCA + Decision Loop",{"type":41,"tag":57,"props":6675,"children":6676},{},[6677,6692],{"type":41,"tag":61,"props":6678,"children":6679},{},[6680,6685,6687],{"type":41,"tag":67,"props":6681,"children":6682},{},[6683],{"type":47,"value":6684},"IMPORTANT",{"type":47,"value":6686},": ",{"type":41,"tag":67,"props":6688,"children":6689},{},[6690],{"type":47,"value":6691},"RCA is mandatory after every failed iteration.",{"type":41,"tag":78,"props":6693,"children":6694},{},[6695,6700,6705,6717],{"type":41,"tag":82,"props":6696,"children":6697},{},[6698],{"type":47,"value":6699},"Do Not skip RCA.",{"type":41,"tag":82,"props":6701,"children":6702},{},[6703],{"type":47,"value":6704},"Do NOT read summary files and write your own RCA.",{"type":41,"tag":82,"props":6706,"children":6707},{},[6708,6710,6715],{"type":47,"value":6709},"Do NOT use Step 8b-fallback's heuristics as a routine substitute — they exist ONLY for the case where ",{"type":41,"tag":91,"props":6711,"children":6713},{"className":6712},[],[6714],{"type":47,"value":96},{"type":47,"value":6716}," delegation actually fails (skill missing, error, no report after retry).",{"type":41,"tag":82,"props":6718,"children":6719},{},[6720,6722,6727,6729,6735,6736,6741],{"type":47,"value":6721},"Always delegate to ",{"type":41,"tag":91,"props":6723,"children":6725},{"className":6724},[],[6726],{"type":47,"value":96},{"type":47,"value":6728},". The only sanctioned skip is ",{"type":41,"tag":91,"props":6730,"children":6732},{"className":6731},[],[6733],{"type":47,"value":6734},"run_rca: false",{"type":47,"value":3772},{"type":41,"tag":91,"props":6737,"children":6739},{"className":6738},[],[6740],{"type":47,"value":169},{"type":47,"value":6742},". Step 8a's pre-flight gate (below) blocks iterations that try to skip RCA.",{"type":41,"tag":138,"props":6744,"children":6746},{"id":6745},"_8a-check-success-criteria",[6747],{"type":47,"value":6748},"8a. Check Success Criteria",{"type":41,"tag":6750,"props":6751,"children":6753},"h4",{"id":6752},"_8a0-bookkeeping-gate-run-first-before-anything-else-in-step-8",[6754],{"type":47,"value":6755},"8a.0 — Bookkeeping gate (RUN FIRST, before anything else in Step 8)",{"type":41,"tag":61,"props":6757,"children":6758},{},[6759,6761,6766],{"type":47,"value":6760},"This is the executable form of the invariant promised above. It is a hard ",{"type":41,"tag":67,"props":6762,"children":6763},{},[6764],{"type":47,"value":6765},"STOP",{"type":47,"value":6767},", not advice.\nYou may not check success criteria, select an action, or declare SUCCESS\u002FPARTIAL until ALL FOUR\nassertions below pass. They are cheap; run them on entry to Step 8 every single iteration.",{"type":41,"tag":180,"props":6769,"children":6771},{"className":6436,"code":6770,"language":6438,"meta":185,"style":185},"bud = run_state.iteration_budget\n\n# (1) Every eval that has been RUN must have an eval_history[] row. One row PER eval —\n#     a 3-point threshold sweep is 3 rows (disambiguated by ddm_threshold \u002F nms_sec \u002F changes_applied),\n#     not 1. This is what was missing when the run drifted: evals happened, rows didn't.\nn_evals_run = count_evals_actually_run()   # = number of \u002Fsop-by-action-eval + \u002Fsop-e2e-inference completions this run\nassert len(run_state.eval_history) == n_evals_run, (\n    f\"BOOKKEEPING GATE: {n_evals_run} evals run but eval_history has \"\n    f\"{len(run_state.eval_history)} rows. Append the missing row(s) NOW — including for \"\n    f\"eval-only threshold\u002FNMS sweeps — before proceeding. Do not batch 'consolidate later'.\"\n)\n\n# (2) Every FAILED eval must have a completed \u002Fsop-rca run behind it (unless run_rca: false).\n#     rca_runs_completed is incremented ONLY in Step 8b after rca_report.md is verified on disk —\n#     never hand-set it. eval-only iterations are NOT exempt: a failed re-eval still needs RCA.\nif inputs.run_rca:\n    n_failed = len([e for e in run_state.eval_history if not meets_criteria(e, inputs.success_criteria)])\n    assert bud.rca_runs_completed == n_failed, (\n        f\"RCA GATE: {n_failed} failed evals but only {bud.rca_runs_completed} RCA runs. \"\n        f\"Run \u002Fsop-rca (Step 8b) on the un-analysed failed eval(s) before selecting any action. \"\n        f\"Writing your own diagnosis instead of delegating to \u002Fsop-rca is the exact violation \"\n        f\"this gate exists to catch.\"\n    )\n\n# (3) Progress files must exist and be current for THIS iteration (local artifacts, Step 2).\n#     progress.md gets this iteration's row; progress.html is regenerated.\nassert progress_md_exists() and last_logged_iter(progress_md) == run_state.iteration, (\n    \"PROGRESS GATE: progress.md missing or stale (no row for current iteration). \"\n    \"Append this iteration's row NOW (Step 7c \u002F Step 9).\"\n)\nassert progress_html_exists(), (\n    \"PROGRESS GATE: progress.html missing. Regenerate it from the template NOW (Step 7c).\"\n)\n\n# (4) Each eval run THIS iteration must be snapshotted into iter\u003CN>\u002F\u003Cphase>\u002F (Step 7c).\n#     This is what gives eval-only iters a folder and pins which eval_job_id was this iter.\nitdir = f\"{run_dir}\u002Fiter{run_state.iteration}\"\nfor phase in evals_run_this_iter():          # subset of {\"by_action\", \"e2e\"}\n    assert snapshot_nonempty(f\"{itdir}\u002F{phase}\"), (\n        f\"SNAPSHOT GATE: {phase} eval ran this iter but {itdir}\u002F{phase}\u002F is missing or empty. \"\n        f\"cp -a \u003Chost_output_dir>\u002F. {itdir}\u002F{phase}\u002F NOW (Step 7c) before proceeding.\"\n    )\n",[6772],{"type":41,"tag":91,"props":6773,"children":6774},{"__ignoreMap":185},[6775,6783,6792,6800,6808,6816,6824,6832,6840,6848,6856,6863,6870,6878,6887,6896,6905,6914,6923,6932,6941,6950,6959,6968,6976,6985,6994,7003,7012,7021,7029,7038,7047,7055,7063,7072,7081,7090,7099,7107,7116,7125],{"type":41,"tag":191,"props":6776,"children":6777},{"class":193,"line":194},[6778],{"type":41,"tag":191,"props":6779,"children":6780},{},[6781],{"type":47,"value":6782},"bud = run_state.iteration_budget\n",{"type":41,"tag":191,"props":6784,"children":6785},{"class":193,"line":210},[6786],{"type":41,"tag":191,"props":6787,"children":6789},{"emptyLinePlaceholder":6788},true,[6790],{"type":47,"value":6791},"\n",{"type":41,"tag":191,"props":6793,"children":6794},{"class":193,"line":235},[6795],{"type":41,"tag":191,"props":6796,"children":6797},{},[6798],{"type":47,"value":6799},"# (1) Every eval that has been RUN must have an eval_history[] row. One row PER eval —\n",{"type":41,"tag":191,"props":6801,"children":6802},{"class":193,"line":258},[6803],{"type":41,"tag":191,"props":6804,"children":6805},{},[6806],{"type":47,"value":6807},"#     a 3-point threshold sweep is 3 rows (disambiguated by ddm_threshold \u002F nms_sec \u002F changes_applied),\n",{"type":41,"tag":191,"props":6809,"children":6810},{"class":193,"line":280},[6811],{"type":41,"tag":191,"props":6812,"children":6813},{},[6814],{"type":47,"value":6815},"#     not 1. This is what was missing when the run drifted: evals happened, rows didn't.\n",{"type":41,"tag":191,"props":6817,"children":6818},{"class":193,"line":302},[6819],{"type":41,"tag":191,"props":6820,"children":6821},{},[6822],{"type":47,"value":6823},"n_evals_run = count_evals_actually_run()   # = number of \u002Fsop-by-action-eval + \u002Fsop-e2e-inference completions this run\n",{"type":41,"tag":191,"props":6825,"children":6826},{"class":193,"line":324},[6827],{"type":41,"tag":191,"props":6828,"children":6829},{},[6830],{"type":47,"value":6831},"assert len(run_state.eval_history) == n_evals_run, (\n",{"type":41,"tag":191,"props":6833,"children":6834},{"class":193,"line":342},[6835],{"type":41,"tag":191,"props":6836,"children":6837},{},[6838],{"type":47,"value":6839},"    f\"BOOKKEEPING GATE: {n_evals_run} evals run but eval_history has \"\n",{"type":41,"tag":191,"props":6841,"children":6842},{"class":193,"line":365},[6843],{"type":41,"tag":191,"props":6844,"children":6845},{},[6846],{"type":47,"value":6847},"    f\"{len(run_state.eval_history)} rows. Append the missing row(s) NOW — including for \"\n",{"type":41,"tag":191,"props":6849,"children":6850},{"class":193,"line":387},[6851],{"type":41,"tag":191,"props":6852,"children":6853},{},[6854],{"type":47,"value":6855},"    f\"eval-only threshold\u002FNMS sweeps — before proceeding. Do not batch 'consolidate later'.\"\n",{"type":41,"tag":191,"props":6857,"children":6858},{"class":193,"line":409},[6859],{"type":41,"tag":191,"props":6860,"children":6861},{},[6862],{"type":47,"value":4661},{"type":41,"tag":191,"props":6864,"children":6865},{"class":193,"line":27},[6866],{"type":41,"tag":191,"props":6867,"children":6868},{"emptyLinePlaceholder":6788},[6869],{"type":47,"value":6791},{"type":41,"tag":191,"props":6871,"children":6872},{"class":193,"line":5765},[6873],{"type":41,"tag":191,"props":6874,"children":6875},{},[6876],{"type":47,"value":6877},"# (2) Every FAILED eval must have a completed \u002Fsop-rca run behind it (unless run_rca: false).\n",{"type":41,"tag":191,"props":6879,"children":6881},{"class":193,"line":6880},14,[6882],{"type":41,"tag":191,"props":6883,"children":6884},{},[6885],{"type":47,"value":6886},"#     rca_runs_completed is incremented ONLY in Step 8b after rca_report.md is verified on disk —\n",{"type":41,"tag":191,"props":6888,"children":6890},{"class":193,"line":6889},15,[6891],{"type":41,"tag":191,"props":6892,"children":6893},{},[6894],{"type":47,"value":6895},"#     never hand-set it. eval-only iterations are NOT exempt: a failed re-eval still needs RCA.\n",{"type":41,"tag":191,"props":6897,"children":6899},{"class":193,"line":6898},16,[6900],{"type":41,"tag":191,"props":6901,"children":6902},{},[6903],{"type":47,"value":6904},"if inputs.run_rca:\n",{"type":41,"tag":191,"props":6906,"children":6908},{"class":193,"line":6907},17,[6909],{"type":41,"tag":191,"props":6910,"children":6911},{},[6912],{"type":47,"value":6913},"    n_failed = len([e for e in run_state.eval_history if not meets_criteria(e, inputs.success_criteria)])\n",{"type":41,"tag":191,"props":6915,"children":6917},{"class":193,"line":6916},18,[6918],{"type":41,"tag":191,"props":6919,"children":6920},{},[6921],{"type":47,"value":6922},"    assert bud.rca_runs_completed == n_failed, (\n",{"type":41,"tag":191,"props":6924,"children":6926},{"class":193,"line":6925},19,[6927],{"type":41,"tag":191,"props":6928,"children":6929},{},[6930],{"type":47,"value":6931},"        f\"RCA GATE: {n_failed} failed evals but only {bud.rca_runs_completed} RCA runs. \"\n",{"type":41,"tag":191,"props":6933,"children":6935},{"class":193,"line":6934},20,[6936],{"type":41,"tag":191,"props":6937,"children":6938},{},[6939],{"type":47,"value":6940},"        f\"Run \u002Fsop-rca (Step 8b) on the un-analysed failed eval(s) before selecting any action. \"\n",{"type":41,"tag":191,"props":6942,"children":6944},{"class":193,"line":6943},21,[6945],{"type":41,"tag":191,"props":6946,"children":6947},{},[6948],{"type":47,"value":6949},"        f\"Writing your own diagnosis instead of delegating to \u002Fsop-rca is the exact violation \"\n",{"type":41,"tag":191,"props":6951,"children":6953},{"class":193,"line":6952},22,[6954],{"type":41,"tag":191,"props":6955,"children":6956},{},[6957],{"type":47,"value":6958},"        f\"this gate exists to catch.\"\n",{"type":41,"tag":191,"props":6960,"children":6962},{"class":193,"line":6961},23,[6963],{"type":41,"tag":191,"props":6964,"children":6965},{},[6966],{"type":47,"value":6967},"    )\n",{"type":41,"tag":191,"props":6969,"children":6971},{"class":193,"line":6970},24,[6972],{"type":41,"tag":191,"props":6973,"children":6974},{"emptyLinePlaceholder":6788},[6975],{"type":47,"value":6791},{"type":41,"tag":191,"props":6977,"children":6979},{"class":193,"line":6978},25,[6980],{"type":41,"tag":191,"props":6981,"children":6982},{},[6983],{"type":47,"value":6984},"# (3) Progress files must exist and be current for THIS iteration (local artifacts, Step 2).\n",{"type":41,"tag":191,"props":6986,"children":6988},{"class":193,"line":6987},26,[6989],{"type":41,"tag":191,"props":6990,"children":6991},{},[6992],{"type":47,"value":6993},"#     progress.md gets this iteration's row; progress.html is regenerated.\n",{"type":41,"tag":191,"props":6995,"children":6997},{"class":193,"line":6996},27,[6998],{"type":41,"tag":191,"props":6999,"children":7000},{},[7001],{"type":47,"value":7002},"assert progress_md_exists() and last_logged_iter(progress_md) == run_state.iteration, (\n",{"type":41,"tag":191,"props":7004,"children":7006},{"class":193,"line":7005},28,[7007],{"type":41,"tag":191,"props":7008,"children":7009},{},[7010],{"type":47,"value":7011},"    \"PROGRESS GATE: progress.md missing or stale (no row for current iteration). \"\n",{"type":41,"tag":191,"props":7013,"children":7015},{"class":193,"line":7014},29,[7016],{"type":41,"tag":191,"props":7017,"children":7018},{},[7019],{"type":47,"value":7020},"    \"Append this iteration's row NOW (Step 7c \u002F Step 9).\"\n",{"type":41,"tag":191,"props":7022,"children":7024},{"class":193,"line":7023},30,[7025],{"type":41,"tag":191,"props":7026,"children":7027},{},[7028],{"type":47,"value":4661},{"type":41,"tag":191,"props":7030,"children":7032},{"class":193,"line":7031},31,[7033],{"type":41,"tag":191,"props":7034,"children":7035},{},[7036],{"type":47,"value":7037},"assert progress_html_exists(), (\n",{"type":41,"tag":191,"props":7039,"children":7041},{"class":193,"line":7040},32,[7042],{"type":41,"tag":191,"props":7043,"children":7044},{},[7045],{"type":47,"value":7046},"    \"PROGRESS GATE: progress.html missing. Regenerate it from the template NOW (Step 7c).\"\n",{"type":41,"tag":191,"props":7048,"children":7050},{"class":193,"line":7049},33,[7051],{"type":41,"tag":191,"props":7052,"children":7053},{},[7054],{"type":47,"value":4661},{"type":41,"tag":191,"props":7056,"children":7058},{"class":193,"line":7057},34,[7059],{"type":41,"tag":191,"props":7060,"children":7061},{"emptyLinePlaceholder":6788},[7062],{"type":47,"value":6791},{"type":41,"tag":191,"props":7064,"children":7066},{"class":193,"line":7065},35,[7067],{"type":41,"tag":191,"props":7068,"children":7069},{},[7070],{"type":47,"value":7071},"# (4) Each eval run THIS iteration must be snapshotted into iter\u003CN>\u002F\u003Cphase>\u002F (Step 7c).\n",{"type":41,"tag":191,"props":7073,"children":7075},{"class":193,"line":7074},36,[7076],{"type":41,"tag":191,"props":7077,"children":7078},{},[7079],{"type":47,"value":7080},"#     This is what gives eval-only iters a folder and pins which eval_job_id was this iter.\n",{"type":41,"tag":191,"props":7082,"children":7084},{"class":193,"line":7083},37,[7085],{"type":41,"tag":191,"props":7086,"children":7087},{},[7088],{"type":47,"value":7089},"itdir = f\"{run_dir}\u002Fiter{run_state.iteration}\"\n",{"type":41,"tag":191,"props":7091,"children":7093},{"class":193,"line":7092},38,[7094],{"type":41,"tag":191,"props":7095,"children":7096},{},[7097],{"type":47,"value":7098},"for phase in evals_run_this_iter():          # subset of {\"by_action\", \"e2e\"}\n",{"type":41,"tag":191,"props":7100,"children":7101},{"class":193,"line":23},[7102],{"type":41,"tag":191,"props":7103,"children":7104},{},[7105],{"type":47,"value":7106},"    assert snapshot_nonempty(f\"{itdir}\u002F{phase}\"), (\n",{"type":41,"tag":191,"props":7108,"children":7110},{"class":193,"line":7109},40,[7111],{"type":41,"tag":191,"props":7112,"children":7113},{},[7114],{"type":47,"value":7115},"        f\"SNAPSHOT GATE: {phase} eval ran this iter but {itdir}\u002F{phase}\u002F is missing or empty. \"\n",{"type":41,"tag":191,"props":7117,"children":7119},{"class":193,"line":7118},41,[7120],{"type":41,"tag":191,"props":7121,"children":7122},{},[7123],{"type":47,"value":7124},"        f\"cp -a \u003Chost_output_dir>\u002F. {itdir}\u002F{phase}\u002F NOW (Step 7c) before proceeding.\"\n",{"type":41,"tag":191,"props":7126,"children":7128},{"class":193,"line":7127},42,[7129],{"type":41,"tag":191,"props":7130,"children":7131},{},[7132],{"type":47,"value":6967},{"type":41,"tag":61,"props":7134,"children":7135},{},[7136],{"type":47,"value":7137},"If any assertion fires, the ONLY valid next move is to do the missing work (snapshot eval output \u002F\nappend rows \u002F run RCA \u002F write progress files), not to continue. There is no path through Step 8 that\nleaves these unsatisfied.",{"type":41,"tag":6750,"props":7139,"children":7141},{"id":7140},"_8a1-success-check",[7142],{"type":47,"value":7143},"8a.1 — Success check",{"type":41,"tag":180,"props":7145,"children":7147},{"className":6436,"code":7146,"language":6438,"meta":185,"style":185},"r = latest_eval\nc = inputs.success_criteria\n\nall_met = all([\n    c.ddm_f1 is None            or r.ddm_f1            >= c.ddm_f1,\n    c.by_action_accuracy is None or r.by_action_acc     >= c.by_action_accuracy,\n    c.e2e_action_accuracy is None or r.e2e_action_acc   >= c.e2e_action_accuracy,\n    c.e2e_sequence_accuracy is None or r.e2e_seq_acc    >= c.e2e_sequence_accuracy,\n])\n",[7148],{"type":41,"tag":91,"props":7149,"children":7150},{"__ignoreMap":185},[7151,7159,7167,7174,7182,7190,7198,7206,7214],{"type":41,"tag":191,"props":7152,"children":7153},{"class":193,"line":194},[7154],{"type":41,"tag":191,"props":7155,"children":7156},{},[7157],{"type":47,"value":7158},"r = latest_eval\n",{"type":41,"tag":191,"props":7160,"children":7161},{"class":193,"line":210},[7162],{"type":41,"tag":191,"props":7163,"children":7164},{},[7165],{"type":47,"value":7166},"c = inputs.success_criteria\n",{"type":41,"tag":191,"props":7168,"children":7169},{"class":193,"line":235},[7170],{"type":41,"tag":191,"props":7171,"children":7172},{"emptyLinePlaceholder":6788},[7173],{"type":47,"value":6791},{"type":41,"tag":191,"props":7175,"children":7176},{"class":193,"line":258},[7177],{"type":41,"tag":191,"props":7178,"children":7179},{},[7180],{"type":47,"value":7181},"all_met = all([\n",{"type":41,"tag":191,"props":7183,"children":7184},{"class":193,"line":280},[7185],{"type":41,"tag":191,"props":7186,"children":7187},{},[7188],{"type":47,"value":7189},"    c.ddm_f1 is None            or r.ddm_f1            >= c.ddm_f1,\n",{"type":41,"tag":191,"props":7191,"children":7192},{"class":193,"line":302},[7193],{"type":41,"tag":191,"props":7194,"children":7195},{},[7196],{"type":47,"value":7197},"    c.by_action_accuracy is None or r.by_action_acc     >= c.by_action_accuracy,\n",{"type":41,"tag":191,"props":7199,"children":7200},{"class":193,"line":324},[7201],{"type":41,"tag":191,"props":7202,"children":7203},{},[7204],{"type":47,"value":7205},"    c.e2e_action_accuracy is None or r.e2e_action_acc   >= c.e2e_action_accuracy,\n",{"type":41,"tag":191,"props":7207,"children":7208},{"class":193,"line":342},[7209],{"type":41,"tag":191,"props":7210,"children":7211},{},[7212],{"type":47,"value":7213},"    c.e2e_sequence_accuracy is None or r.e2e_seq_acc    >= c.e2e_sequence_accuracy,\n",{"type":41,"tag":191,"props":7215,"children":7216},{"class":193,"line":365},[7217],{"type":41,"tag":191,"props":7218,"children":7219},{},[7220],{"type":47,"value":7221},"])\n",{"type":41,"tag":61,"props":7223,"children":7224},{},[7225,7227,7233,7234,7239],{"type":47,"value":7226},"If ",{"type":41,"tag":91,"props":7228,"children":7230},{"className":7229},[],[7231],{"type":47,"value":7232},"all_met",{"type":47,"value":2772},{"type":41,"tag":67,"props":7235,"children":7236},{},[7237],{"type":47,"value":7238},"SUCCESS",{"type":47,"value":7240},". Go to Step 9.",{"type":41,"tag":61,"props":7242,"children":7243},{},[7244],{"type":41,"tag":67,"props":7245,"children":7246},{},[7247],{"type":47,"value":7248},"To trigger PARTIAL, ALL of these must be true:",{"type":41,"tag":180,"props":7250,"children":7252},{"className":6436,"code":7251,"language":6438,"meta":185,"style":185},"budget = run_state.iteration_budget\nattempts = budget.attempts\n\npartial_gate = all([\n    budget.iterations_substantive >= budget.max_pipeline_iterations,\n    len(attempts.augment_config_change)    >= 2,    # at least 2 distinct augment strategies tried\n    len(attempts.training_config_change)   >= 1,    # at least 1 training-config-change tried\n    len(attempts.ddm_training_config_change) >= 1,  # at least 1 ddm-training-config-change tried\n])\n",[7253],{"type":41,"tag":91,"props":7254,"children":7255},{"__ignoreMap":185},[7256,7264,7272,7279,7287,7295,7303,7311,7319],{"type":41,"tag":191,"props":7257,"children":7258},{"class":193,"line":194},[7259],{"type":41,"tag":191,"props":7260,"children":7261},{},[7262],{"type":47,"value":7263},"budget = run_state.iteration_budget\n",{"type":41,"tag":191,"props":7265,"children":7266},{"class":193,"line":210},[7267],{"type":41,"tag":191,"props":7268,"children":7269},{},[7270],{"type":47,"value":7271},"attempts = budget.attempts\n",{"type":41,"tag":191,"props":7273,"children":7274},{"class":193,"line":235},[7275],{"type":41,"tag":191,"props":7276,"children":7277},{"emptyLinePlaceholder":6788},[7278],{"type":47,"value":6791},{"type":41,"tag":191,"props":7280,"children":7281},{"class":193,"line":258},[7282],{"type":41,"tag":191,"props":7283,"children":7284},{},[7285],{"type":47,"value":7286},"partial_gate = all([\n",{"type":41,"tag":191,"props":7288,"children":7289},{"class":193,"line":280},[7290],{"type":41,"tag":191,"props":7291,"children":7292},{},[7293],{"type":47,"value":7294},"    budget.iterations_substantive >= budget.max_pipeline_iterations,\n",{"type":41,"tag":191,"props":7296,"children":7297},{"class":193,"line":302},[7298],{"type":41,"tag":191,"props":7299,"children":7300},{},[7301],{"type":47,"value":7302},"    len(attempts.augment_config_change)    >= 2,    # at least 2 distinct augment strategies tried\n",{"type":41,"tag":191,"props":7304,"children":7305},{"class":193,"line":324},[7306],{"type":41,"tag":191,"props":7307,"children":7308},{},[7309],{"type":47,"value":7310},"    len(attempts.training_config_change)   >= 1,    # at least 1 training-config-change tried\n",{"type":41,"tag":191,"props":7312,"children":7313},{"class":193,"line":342},[7314],{"type":41,"tag":191,"props":7315,"children":7316},{},[7317],{"type":47,"value":7318},"    len(attempts.ddm_training_config_change) >= 1,  # at least 1 ddm-training-config-change tried\n",{"type":41,"tag":191,"props":7320,"children":7321},{"class":193,"line":365},[7322],{"type":41,"tag":191,"props":7323,"children":7324},{},[7325],{"type":47,"value":7221},{"type":41,"tag":61,"props":7327,"children":7328},{},[7329,7330,7336],{"type":47,"value":7226},{"type":41,"tag":91,"props":7331,"children":7333},{"className":7332},[],[7334],{"type":47,"value":7335},"partial_gate",{"type":47,"value":7337}," is True → PARTIAL. Run Step 8b (RCA report is mandatory handoff), then Step 9.",{"type":41,"tag":61,"props":7339,"children":7340},{},[7341,7352],{"type":41,"tag":67,"props":7342,"children":7343},{},[7344,7345,7350],{"type":47,"value":7226},{"type":41,"tag":91,"props":7346,"children":7348},{"className":7347},[],[7349],{"type":47,"value":7335},{"type":47,"value":7351}," is False — KEEP ITERATING.",{"type":47,"value":7353}," Judgment calls (\"more data needed\", \"won't work\") are NOT grounds for PARTIAL without exhausting the substantive budget across all fix categories.",{"type":41,"tag":61,"props":7355,"children":7356},{},[7357],{"type":41,"tag":67,"props":7358,"children":7359},{},[7360],{"type":47,"value":7361},"Common premature-stop antipatterns:",{"type":41,"tag":78,"props":7363,"children":7364},{},[7365,7370,7375],{"type":41,"tag":82,"props":7366,"children":7367},{},[7368],{"type":47,"value":7369},"DDM threshold sweeps at 0.3\u002F0.4\u002F0.5\u002F0.6 → eval-only, budget unused.",{"type":41,"tag":82,"props":7371,"children":7372},{},[7373],{"type":47,"value":7374},"DMCQ retrain regressed → alternative DMCQ mode (adjacent vs confusion) not tried yet.",{"type":41,"tag":82,"props":7376,"children":7377},{},[7378],{"type":47,"value":7379},"LR not verified correct → fix LR first before concluding training is stalled.",{"type":41,"tag":61,"props":7381,"children":7382},{},[7383,7385,7390],{"type":47,"value":7384},"You ",{"type":41,"tag":67,"props":7386,"children":7387},{},[7388],{"type":47,"value":7389},"must",{"type":47,"value":7391}," run Step 8b before anything in Step 8c.",{"type":41,"tag":138,"props":7393,"children":7395},{"id":7394},"_8b-run-rca-required-gate-before-action-selection",[7396],{"type":47,"value":7397},"8b. Run RCA (required gate before action selection)",{"type":41,"tag":61,"props":7399,"children":7400},{},[7401,7402,7408,7409,7421,7423,7429,7431,7437],{"type":47,"value":2879},{"type":41,"tag":91,"props":7403,"children":7405},{"className":7404},[],[7406],{"type":47,"value":7407},"phase_status.rca: in_progress",{"type":47,"value":2492},{"type":41,"tag":67,"props":7410,"children":7411},{},[7412,7414,7419],{"type":47,"value":7413},"dispatch ",{"type":41,"tag":91,"props":7415,"children":7417},{"className":7416},[],[7418],{"type":47,"value":96},{"type":47,"value":7420}," as a sub-agent",{"type":47,"value":7422}," (Agent tool, e.g. ",{"type":41,"tag":91,"props":7424,"children":7426},{"className":7425},[],[7427],{"type":47,"value":7428},"subagent_type: general-purpose",{"type":47,"value":7430},") — instruct the sub-agent to invoke the ",{"type":41,"tag":91,"props":7432,"children":7434},{"className":7433},[],[7435],{"type":47,"value":7436},"sop-rca-plugin:sop-rca",{"type":47,"value":7438}," skill with the payload below and to return exactly what that skill's \"Invocation & Return Contract\" specifies.",{"type":41,"tag":61,"props":7440,"children":7441},{},[7442,7447,7449,7454,7456,7461,7463,7468,7470,7475,7477,7482],{"type":41,"tag":67,"props":7443,"children":7444},{},[7445],{"type":47,"value":7446},"Why a sub-agent (this is the rule, not an option):",{"type":47,"value":7448}," the ",{"type":41,"tag":91,"props":7450,"children":7452},{"className":7451},[],[7453],{"type":47,"value":96},{"type":47,"value":7455}," skill body, its helper-script output, and per-video analysis are large. Running it in a sub-agent keeps ALL of that in the sub-agent's context; the orchestrator receives only the compact ",{"type":41,"tag":91,"props":7457,"children":7459},{"className":7458},[],[7460],{"type":47,"value":1733},{"type":47,"value":7462}," block. This makes RCA ",{"type":41,"tag":67,"props":7464,"children":7465},{},[7466],{"type":47,"value":7467},"always affordable no matter how many iterations run",{"type":47,"value":7469}," — so there is ",{"type":41,"tag":67,"props":7471,"children":7472},{},[7473],{"type":47,"value":7474},"never",{"type":47,"value":7476}," a context\u002Ftoken reason to skip it or hand-author the RCA yourself. Authoring your own RCA, or reading the eval files and writing your own diagnosis, is a violation (Step 8a's gate catches it); the sub-agent exists precisely to remove the temptation. The ",{"type":41,"tag":91,"props":7478,"children":7480},{"className":7479},[],[7481],{"type":47,"value":96},{"type":47,"value":7483}," skill is path-driven and self-contained, so the fresh sub-agent has everything it needs from the payload.",{"type":41,"tag":61,"props":7485,"children":7486},{},[7487,7489,7495,7497,7502],{"type":47,"value":7488},"The sub-agent reads from the durable ",{"type":41,"tag":91,"props":7490,"children":7492},{"className":7491},[],[7493],{"type":47,"value":7494},"iter\u003CN>\u002F",{"type":47,"value":7496}," snapshot (Step 7c) plus the augment\u002FDDM\u002FVLM config snapshots and training log — everything the payload references lives under ",{"type":41,"tag":91,"props":7498,"children":7500},{"className":7499},[],[7501],{"type":47,"value":1691},{"type":47,"value":178},{"type":41,"tag":180,"props":7504,"children":7507},{"className":7505,"code":7506,"language":47},[1051],"\u002Fsop-rca\n  e2e_outputs_dir:       \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_action_recognition\n  ddm_outputs_dir:       \u003Crun_dir>\u002Fiter\u003CN>\u002Fe2e\u002Foutputs_temporal_segmentation\n  by_action_results:     \u003Crun_dir>\u002Fiter\u003CN>\u002Fby_action\u002Finference_results.json   # JSON preferred; log.txt also accepted by analyze_by_action_confusion.py\n  actions_json:          \u003Cdataset_path>\u002Factions.json\n  augment_config:        \u003Crun_dir>\u002Fiter\u003CN>\u002Faugment_config.yaml\n  ddm_training_config:   \u003Crun_dir>\u002Fiter\u003CN>\u002Fddm_train_config.yaml\n  vlm_training_config:   \u003Crun_dir>\u002Fiter\u003CN>\u002Ftrain_config.toml\n  vlm_training_log:      \u003Crun_dir>\u002Fiter\u003CN>\u002Ftraining.log\n  output_dir:            \u003Crun_dir>\u002Fiter\u003CN>\u002F                                # RCA writes rca_report.md here\n",[7508],{"type":41,"tag":91,"props":7509,"children":7510},{"__ignoreMap":185},[7511],{"type":47,"value":7506},{"type":41,"tag":61,"props":7513,"children":7514},{},[7515,7517,7523,7525,7530,7532,7537],{"type":47,"value":7516},"No path-discovery, no copy-of-",{"type":41,"tag":91,"props":7518,"children":7520},{"className":7519},[],[7521],{"type":47,"value":7522},"actions.json",{"type":47,"value":7524},". The orchestrator already knows ",{"type":41,"tag":91,"props":7526,"children":7528},{"className":7527},[],[7529],{"type":47,"value":1776},{"type":47,"value":7531},"; RCA reads ",{"type":41,"tag":91,"props":7533,"children":7535},{"className":7534},[],[7536],{"type":47,"value":7522},{"type":47,"value":7538}," from that location directly. If it's missing, that is a setup bug — surface and stop, do not silently work around.",{"type":41,"tag":61,"props":7540,"children":7541},{},[7542,7544,7554,7555,7560,7561,7567,7568,7574,7575,7581,7582,7588,7589,7595,7597,7602,7604,7610,7612,7617,7619,7624,7626,7631,7633,7639],{"type":47,"value":7543},"The sub-agent's final message is the compact ",{"type":41,"tag":67,"props":7545,"children":7546},{},[7547,7552],{"type":41,"tag":91,"props":7548,"children":7550},{"className":7549},[],[7551],{"type":47,"value":1733},{"type":47,"value":7553}," block",{"type":47,"value":2806},{"type":41,"tag":91,"props":7556,"children":7558},{"className":7557},[],[7559],{"type":47,"value":5313},{"type":47,"value":655},{"type":41,"tag":91,"props":7562,"children":7564},{"className":7563},[],[7565],{"type":47,"value":7566},"report_path",{"type":47,"value":655},{"type":41,"tag":91,"props":7569,"children":7571},{"className":7570},[],[7572],{"type":47,"value":7573},"rca_analysis_dir",{"type":47,"value":655},{"type":41,"tag":91,"props":7576,"children":7578},{"className":7577},[],[7579],{"type":47,"value":7580},"headline_metrics",{"type":47,"value":655},{"type":41,"tag":91,"props":7583,"children":7585},{"className":7584},[],[7586],{"type":47,"value":7587},"typed_actions",{"type":47,"value":655},{"type":41,"tag":91,"props":7590,"children":7592},{"className":7591},[],[7593],{"type":47,"value":7594},"one_line_verdict",{"type":47,"value":7596},") — NOT the report prose. Consume it directly: read ",{"type":41,"tag":91,"props":7598,"children":7600},{"className":7599},[],[7601],{"type":47,"value":7566},{"type":47,"value":7603}," (the report + ",{"type":41,"tag":91,"props":7605,"children":7607},{"className":7606},[],[7608],{"type":47,"value":7609},"rca_analysis\u002F",{"type":47,"value":7611}," are on disk under ",{"type":41,"tag":91,"props":7613,"children":7615},{"className":7614},[],[7616],{"type":47,"value":1691},{"type":47,"value":7618},") and copy ",{"type":41,"tag":91,"props":7620,"children":7622},{"className":7621},[],[7623],{"type":47,"value":7587},{"type":47,"value":7625}," verbatim into ",{"type":41,"tag":91,"props":7627,"children":7629},{"className":7628},[],[7630],{"type":47,"value":104},{"type":47,"value":7632},"'s ",{"type":41,"tag":91,"props":7634,"children":7636},{"className":7635},[],[7637],{"type":47,"value":7638},"rca_reports:",{"type":47,"value":178},{"type":41,"tag":180,"props":7641,"children":7643},{"className":182,"code":7642,"language":184,"meta":185,"style":185},"rca_reports:\n  - iteration: N\n    report_path: \u003Crun_dir>\u002Fiter\u003CN>\u002Frca_report.md      # from RCA_RESULT.report_path\n    typed_actions:    # verbatim from RCA_RESULT.typed_actions\n      - {action_type: eval-config-change,    pattern: 1, summary: \"...\"}\n      - {action_type: augment-config-change, pattern: 2, summary: \"...\"}\n",[7644],{"type":41,"tag":91,"props":7645,"children":7646},{"__ignoreMap":185},[7647,7658,7677,7699,7716,7793],{"type":41,"tag":191,"props":7648,"children":7649},{"class":193,"line":194},[7650,7654],{"type":41,"tag":191,"props":7651,"children":7652},{"style":198},[7653],{"type":47,"value":2457},{"type":41,"tag":191,"props":7655,"children":7656},{"style":204},[7657],{"type":47,"value":207},{"type":41,"tag":191,"props":7659,"children":7660},{"class":193,"line":210},[7661,7665,7669,7673],{"type":41,"tag":191,"props":7662,"children":7663},{"style":204},[7664],{"type":47,"value":6286},{"type":41,"tag":191,"props":7666,"children":7667},{"style":198},[7668],{"type":47,"value":6291},{"type":41,"tag":191,"props":7670,"children":7671},{"style":204},[7672],{"type":47,"value":178},{"type":41,"tag":191,"props":7674,"children":7675},{"style":2604},[7676],{"type":47,"value":6300},{"type":41,"tag":191,"props":7678,"children":7679},{"class":193,"line":235},[7680,7685,7689,7694],{"type":41,"tag":191,"props":7681,"children":7682},{"style":198},[7683],{"type":47,"value":7684},"    report_path",{"type":41,"tag":191,"props":7686,"children":7687},{"style":204},[7688],{"type":47,"value":178},{"type":41,"tag":191,"props":7690,"children":7691},{"style":1240},[7692],{"type":47,"value":7693}," \u003Crun_dir>\u002Fiter\u003CN>\u002Frca_report.md",{"type":41,"tag":191,"props":7695,"children":7696},{"style":229},[7697],{"type":47,"value":7698},"      # from RCA_RESULT.report_path\n",{"type":41,"tag":191,"props":7700,"children":7701},{"class":193,"line":258},[7702,7707,7711],{"type":41,"tag":191,"props":7703,"children":7704},{"style":198},[7705],{"type":47,"value":7706},"    typed_actions",{"type":41,"tag":191,"props":7708,"children":7709},{"style":204},[7710],{"type":47,"value":178},{"type":41,"tag":191,"props":7712,"children":7713},{"style":229},[7714],{"type":47,"value":7715},"    # verbatim from RCA_RESULT.typed_actions\n",{"type":41,"tag":191,"props":7717,"children":7718},{"class":193,"line":280},[7719,7724,7729,7734,7738,7743,7748,7753,7757,7762,7766,7771,7775,7779,7784,7788],{"type":41,"tag":191,"props":7720,"children":7721},{"style":204},[7722],{"type":47,"value":7723},"      -",{"type":41,"tag":191,"props":7725,"children":7726},{"style":204},[7727],{"type":47,"value":7728}," {",{"type":41,"tag":191,"props":7730,"children":7731},{"style":198},[7732],{"type":47,"value":7733},"action_type",{"type":41,"tag":191,"props":7735,"children":7736},{"style":204},[7737],{"type":47,"value":178},{"type":41,"tag":191,"props":7739,"children":7740},{"style":1240},[7741],{"type":47,"value":7742}," eval-config-change",{"type":41,"tag":191,"props":7744,"children":7745},{"style":204},[7746],{"type":47,"value":7747},",",{"type":41,"tag":191,"props":7749,"children":7750},{"style":198},[7751],{"type":47,"value":7752},"    pattern",{"type":41,"tag":191,"props":7754,"children":7755},{"style":204},[7756],{"type":47,"value":178},{"type":41,"tag":191,"props":7758,"children":7759},{"style":223},[7760],{"type":47,"value":7761}," 1",{"type":41,"tag":191,"props":7763,"children":7764},{"style":204},[7765],{"type":47,"value":7747},{"type":41,"tag":191,"props":7767,"children":7768},{"style":198},[7769],{"type":47,"value":7770}," summary",{"type":41,"tag":191,"props":7772,"children":7773},{"style":204},[7774],{"type":47,"value":178},{"type":41,"tag":191,"props":7776,"children":7777},{"style":204},[7778],{"type":47,"value":2624},{"type":41,"tag":191,"props":7780,"children":7781},{"style":1240},[7782],{"type":47,"value":7783},"...",{"type":41,"tag":191,"props":7785,"children":7786},{"style":204},[7787],{"type":47,"value":2634},{"type":41,"tag":191,"props":7789,"children":7790},{"style":204},[7791],{"type":47,"value":7792},"}\n",{"type":41,"tag":191,"props":7794,"children":7795},{"class":193,"line":302},[7796,7800,7804,7808,7812,7817,7821,7826,7830,7835,7839,7843,7847,7851,7855,7859],{"type":41,"tag":191,"props":7797,"children":7798},{"style":204},[7799],{"type":47,"value":7723},{"type":41,"tag":191,"props":7801,"children":7802},{"style":204},[7803],{"type":47,"value":7728},{"type":41,"tag":191,"props":7805,"children":7806},{"style":198},[7807],{"type":47,"value":7733},{"type":41,"tag":191,"props":7809,"children":7810},{"style":204},[7811],{"type":47,"value":178},{"type":41,"tag":191,"props":7813,"children":7814},{"style":1240},[7815],{"type":47,"value":7816}," augment-config-change",{"type":41,"tag":191,"props":7818,"children":7819},{"style":204},[7820],{"type":47,"value":7747},{"type":41,"tag":191,"props":7822,"children":7823},{"style":198},[7824],{"type":47,"value":7825}," pattern",{"type":41,"tag":191,"props":7827,"children":7828},{"style":204},[7829],{"type":47,"value":178},{"type":41,"tag":191,"props":7831,"children":7832},{"style":223},[7833],{"type":47,"value":7834}," 2",{"type":41,"tag":191,"props":7836,"children":7837},{"style":204},[7838],{"type":47,"value":7747},{"type":41,"tag":191,"props":7840,"children":7841},{"style":198},[7842],{"type":47,"value":7770},{"type":41,"tag":191,"props":7844,"children":7845},{"style":204},[7846],{"type":47,"value":178},{"type":41,"tag":191,"props":7848,"children":7849},{"style":204},[7850],{"type":47,"value":2624},{"type":41,"tag":191,"props":7852,"children":7853},{"style":1240},[7854],{"type":47,"value":7783},{"type":41,"tag":191,"props":7856,"children":7857},{"style":204},[7858],{"type":47,"value":2634},{"type":41,"tag":191,"props":7860,"children":7861},{"style":204},[7862],{"type":47,"value":7792},{"type":41,"tag":61,"props":7864,"children":7865},{},[7866,7868,7873,7875,7881,7883,7888,7890,7896,7898,7904],{"type":47,"value":7867},"Verify the file at ",{"type":41,"tag":91,"props":7869,"children":7871},{"className":7870},[],[7872],{"type":47,"value":1741},{"type":47,"value":7874}," exists. If the sub-agent returns ",{"type":41,"tag":91,"props":7876,"children":7878},{"className":7877},[],[7879],{"type":47,"value":7880},"status: failed",{"type":47,"value":7882},", no ",{"type":41,"tag":91,"props":7884,"children":7886},{"className":7885},[],[7887],{"type":47,"value":1733},{"type":47,"value":7889}," block, or the file is missing — that is a delegation failure: retry the sub-agent once, then fall to Step 8b-fallback only if it fails again (do NOT hand-author the RCA in lieu of delegating). On success, write ",{"type":41,"tag":91,"props":7891,"children":7893},{"className":7892},[],[7894],{"type":47,"value":7895},"phase_status.rca: done",{"type":47,"value":7897}," and increment ",{"type":41,"tag":91,"props":7899,"children":7901},{"className":7900},[],[7902],{"type":47,"value":7903},"iteration_budget.rca_runs_completed",{"type":47,"value":136},{"type":41,"tag":6750,"props":7906,"children":7908},{"id":7907},"_8b-fallback-when-sop-rca-is-unavailable",[7909,7911,7916],{"type":47,"value":7910},"8b-fallback: When ",{"type":41,"tag":91,"props":7912,"children":7914},{"className":7913},[],[7915],{"type":47,"value":96},{"type":47,"value":7917}," is unavailable",{"type":41,"tag":61,"props":7919,"children":7920},{},[7921,7933,7935,7941,7943,7948,7950,7955,7957,7962],{"type":41,"tag":67,"props":7922,"children":7923},{},[7924,7926,7931],{"type":47,"value":7925},"Use ONLY when delegation to ",{"type":41,"tag":91,"props":7927,"children":7929},{"className":7928},[],[7930],{"type":47,"value":96},{"type":47,"value":7932}," actually fails",{"type":47,"value":7934}," — the skill is missing, errors out, or returns no ",{"type":41,"tag":91,"props":7936,"children":7938},{"className":7937},[],[7939],{"type":47,"value":7940},"rca_report.md",{"type":47,"value":7942}," after a retry. ",{"type":41,"tag":67,"props":7944,"children":7945},{},[7946],{"type":47,"value":7947},"Not a substitute for routine RCA.",{"type":47,"value":7949}," Recognising one of these patterns from metrics alone is ",{"type":41,"tag":1453,"props":7951,"children":7952},{},[7953],{"type":47,"value":7954},"not",{"type":47,"value":7956}," grounds to skip Step 8b — ",{"type":41,"tag":91,"props":7958,"children":7960},{"className":7959},[],[7961],{"type":47,"value":96},{"type":47,"value":7963}," is expected to surface the same patterns plus diagnostics the heuristic table cannot replicate (per-video DDM analysis, residual error budget, signal audit).",{"type":41,"tag":61,"props":7965,"children":7966},{},[7967],{"type":47,"value":7968},"When delegation has demonstrably failed for the current iteration:",{"type":41,"tag":78,"props":7970,"children":7971},{},[7972,7977,7982,7987,7992,7997,8002],{"type":41,"tag":82,"props":7973,"children":7974},{},[7975],{"type":47,"value":7976},"by-action ≈ 0% across all actions → model collapse (Pattern 9): lower LR, check non-SOP over-weighting, increase number of epochs",{"type":41,"tag":82,"props":7978,"children":7979},{},[7980],{"type":47,"value":7981},"by-action 0% on a specific action subset only → DMCQ coverage gap (Pattern 2): add confusion_map for that subset",{"type":41,"tag":82,"props":7983,"children":7984},{},[7985],{"type":47,"value":7986},"E2E seq_acc = 0 but by-action > 95% → DDM threshold too high or DDM under-segmentation: tune threshold first",{"type":41,"tag":82,"props":7988,"children":7989},{},[7990],{"type":47,"value":7991},"33+ duplicates in E2E → MCQ max_chunk_len mismatch: reduce to 2",{"type":41,"tag":82,"props":7993,"children":7994},{},[7995],{"type":47,"value":7996},"Missing actions in E2E → DDM missed boundaries: lower threshold or retrain DDM with RandomResize",{"type":41,"tag":82,"props":7998,"children":7999},{},[8000],{"type":47,"value":8001},"Loss near zero but accuracy still low → format mismatch or evaluation pipeline bug: check eval container and inference params",{"type":41,"tag":82,"props":8003,"children":8004},{},[8005,8007,8013],{"type":47,"value":8006},"One duplicate at end of one video while by-action is high → un-annotated tail (mp4 longer than golden). The BP eval-ms handles trim-to-",{"type":41,"tag":91,"props":8008,"children":8010},{"className":8009},[],[8011],{"type":47,"value":8012},"max(annotation.end_timestamp)",{"type":47,"value":8014}," internally; if the artifact still surfaces, the dataset's annotations may be incomplete — verify the val_dataset registration before iterating.",{"type":41,"tag":61,"props":8016,"children":8017},{},[8018,8020,8026,8028,8033,8035,8040,8042,8047,8048,8053,8055,8060,8062,8067,8069,8075,8077,8083,8085,8090],{"type":47,"value":8019},"After applying a fallback diagnosis: write a brief ",{"type":41,"tag":91,"props":8021,"children":8023},{"className":8022},[],[8024],{"type":47,"value":8025},"\u003Crun_dir>\u002Fiter\u003CN>\u002Frca_report.md",{"type":47,"value":8027}," summarising the heuristic chosen and ",{"type":41,"tag":1453,"props":8029,"children":8030},{},[8031],{"type":47,"value":8032},"why \u002Fsop-rca was unavailable",{"type":47,"value":8034},"; add an ",{"type":41,"tag":91,"props":8036,"children":8038},{"className":8037},[],[8039],{"type":47,"value":1757},{"type":47,"value":8041}," entry with ",{"type":41,"tag":91,"props":8043,"children":8045},{"className":8044},[],[8046],{"type":47,"value":7566},{"type":47,"value":1444},{"type":41,"tag":91,"props":8049,"children":8051},{"className":8050},[],[8052],{"type":47,"value":7587},{"type":47,"value":8054},"; set ",{"type":41,"tag":91,"props":8056,"children":8058},{"className":8057},[],[8059],{"type":47,"value":7895},{"type":47,"value":8061},"; ",{"type":41,"tag":67,"props":8063,"children":8064},{},[8065],{"type":47,"value":8066},"do not",{"type":47,"value":8068}," increment ",{"type":41,"tag":91,"props":8070,"children":8072},{"className":8071},[],[8073],{"type":47,"value":8074},"rca_runs_completed",{"type":47,"value":8076}," (it tracks successful RCA runs only); flag the failure under ",{"type":41,"tag":91,"props":8078,"children":8080},{"className":8079},[],[8081],{"type":47,"value":8082},"notes:",{"type":47,"value":8084}," so the next iteration retries ",{"type":41,"tag":91,"props":8086,"children":8088},{"className":8087},[],[8089],{"type":47,"value":96},{"type":47,"value":136},{"type":41,"tag":138,"props":8092,"children":8094},{"id":8093},"_8c-interpret-rca-and-select-next-action",[8095],{"type":47,"value":8096},"8c. Interpret RCA and Select Next Action",{"type":41,"tag":61,"props":8098,"children":8099},{},[8100,8102,8112],{"type":47,"value":8101},"Priority applies ",{"type":41,"tag":67,"props":8103,"children":8104},{},[8105,8107],{"type":47,"value":8106},"only to typed actions in ",{"type":41,"tag":91,"props":8108,"children":8110},{"className":8109},[],[8111],{"type":47,"value":7940},{"type":47,"value":8113}," — if a pattern is absent, RCA was incomplete: rerun 8b.",{"type":41,"tag":61,"props":8115,"children":8116},{},[8117,8119,8124,8126,8131],{"type":47,"value":8118},"Apply ",{"type":41,"tag":67,"props":8120,"children":8121},{},[8122],{"type":47,"value":8123},"one action per iteration",{"type":47,"value":8125},". Emit full queue to ",{"type":41,"tag":91,"props":8127,"children":8129},{"className":8128},[],[8130],{"type":47,"value":104},{"type":47,"value":8132}," (diversity > depth):",{"type":41,"tag":180,"props":8134,"children":8136},{"className":182,"code":8135,"language":184,"meta":185,"style":185},"iteration_queue:\n  - { iter: N+1, type: substantive, action: training-config-change, hypothesis: \"Correct LR to 5e-6 (small dataset — see LR guidance) before any DMCQ tuning\" }\n  - { iter: N+2, type: substantive, action: augment-config-change, hypothesis: \"DMCQ confusion mode addresses action pair confusion observed in by-action\" }\n  - { iter: N+3, type: substantive, action: augment-config-change, hypothesis: \"DMCQ adjacent mode (alternative signal) if confusion mode regresses or collapses\" }\n  - { iter: N+4, type: substantive, action: ddm-training-config-change, hypothesis: \"RandomResize bilinear to improve DDM generalization\" }\n",[8137],{"type":41,"tag":91,"props":8138,"children":8139},{"__ignoreMap":185},[8140,8152,8244,8329,8414],{"type":41,"tag":191,"props":8141,"children":8142},{"class":193,"line":194},[8143,8148],{"type":41,"tag":191,"props":8144,"children":8145},{"style":198},[8146],{"type":47,"value":8147},"iteration_queue",{"type":41,"tag":191,"props":8149,"children":8150},{"style":204},[8151],{"type":47,"value":207},{"type":41,"tag":191,"props":8153,"children":8154},{"class":193,"line":210},[8155,8159,8163,8168,8172,8177,8181,8186,8190,8195,8199,8204,8208,8213,8217,8222,8226,8230,8235,8239],{"type":41,"tag":191,"props":8156,"children":8157},{"style":204},[8158],{"type":47,"value":6286},{"type":41,"tag":191,"props":8160,"children":8161},{"style":204},[8162],{"type":47,"value":7728},{"type":41,"tag":191,"props":8164,"children":8165},{"style":198},[8166],{"type":47,"value":8167}," iter",{"type":41,"tag":191,"props":8169,"children":8170},{"style":204},[8171],{"type":47,"value":178},{"type":41,"tag":191,"props":8173,"children":8174},{"style":1240},[8175],{"type":47,"value":8176}," N+1",{"type":41,"tag":191,"props":8178,"children":8179},{"style":204},[8180],{"type":47,"value":7747},{"type":41,"tag":191,"props":8182,"children":8183},{"style":198},[8184],{"type":47,"value":8185}," type",{"type":41,"tag":191,"props":8187,"children":8188},{"style":204},[8189],{"type":47,"value":178},{"type":41,"tag":191,"props":8191,"children":8192},{"style":1240},[8193],{"type":47,"value":8194}," substantive",{"type":41,"tag":191,"props":8196,"children":8197},{"style":204},[8198],{"type":47,"value":7747},{"type":41,"tag":191,"props":8200,"children":8201},{"style":198},[8202],{"type":47,"value":8203}," action",{"type":41,"tag":191,"props":8205,"children":8206},{"style":204},[8207],{"type":47,"value":178},{"type":41,"tag":191,"props":8209,"children":8210},{"style":1240},[8211],{"type":47,"value":8212}," training-config-change",{"type":41,"tag":191,"props":8214,"children":8215},{"style":204},[8216],{"type":47,"value":7747},{"type":41,"tag":191,"props":8218,"children":8219},{"style":198},[8220],{"type":47,"value":8221}," hypothesis",{"type":41,"tag":191,"props":8223,"children":8224},{"style":204},[8225],{"type":47,"value":178},{"type":41,"tag":191,"props":8227,"children":8228},{"style":204},[8229],{"type":47,"value":2624},{"type":41,"tag":191,"props":8231,"children":8232},{"style":1240},[8233],{"type":47,"value":8234},"Correct LR to 5e-6 (small dataset — see LR guidance) before any DMCQ tuning",{"type":41,"tag":191,"props":8236,"children":8237},{"style":204},[8238],{"type":47,"value":2634},{"type":41,"tag":191,"props":8240,"children":8241},{"style":204},[8242],{"type":47,"value":8243}," }\n",{"type":41,"tag":191,"props":8245,"children":8246},{"class":193,"line":235},[8247,8251,8255,8259,8263,8268,8272,8276,8280,8284,8288,8292,8296,8300,8304,8308,8312,8316,8321,8325],{"type":41,"tag":191,"props":8248,"children":8249},{"style":204},[8250],{"type":47,"value":6286},{"type":41,"tag":191,"props":8252,"children":8253},{"style":204},[8254],{"type":47,"value":7728},{"type":41,"tag":191,"props":8256,"children":8257},{"style":198},[8258],{"type":47,"value":8167},{"type":41,"tag":191,"props":8260,"children":8261},{"style":204},[8262],{"type":47,"value":178},{"type":41,"tag":191,"props":8264,"children":8265},{"style":1240},[8266],{"type":47,"value":8267}," N+2",{"type":41,"tag":191,"props":8269,"children":8270},{"style":204},[8271],{"type":47,"value":7747},{"type":41,"tag":191,"props":8273,"children":8274},{"style":198},[8275],{"type":47,"value":8185},{"type":41,"tag":191,"props":8277,"children":8278},{"style":204},[8279],{"type":47,"value":178},{"type":41,"tag":191,"props":8281,"children":8282},{"style":1240},[8283],{"type":47,"value":8194},{"type":41,"tag":191,"props":8285,"children":8286},{"style":204},[8287],{"type":47,"value":7747},{"type":41,"tag":191,"props":8289,"children":8290},{"style":198},[8291],{"type":47,"value":8203},{"type":41,"tag":191,"props":8293,"children":8294},{"style":204},[8295],{"type":47,"value":178},{"type":41,"tag":191,"props":8297,"children":8298},{"style":1240},[8299],{"type":47,"value":7816},{"type":41,"tag":191,"props":8301,"children":8302},{"style":204},[8303],{"type":47,"value":7747},{"type":41,"tag":191,"props":8305,"children":8306},{"style":198},[8307],{"type":47,"value":8221},{"type":41,"tag":191,"props":8309,"children":8310},{"style":204},[8311],{"type":47,"value":178},{"type":41,"tag":191,"props":8313,"children":8314},{"style":204},[8315],{"type":47,"value":2624},{"type":41,"tag":191,"props":8317,"children":8318},{"style":1240},[8319],{"type":47,"value":8320},"DMCQ confusion mode addresses action pair confusion observed in by-action",{"type":41,"tag":191,"props":8322,"children":8323},{"style":204},[8324],{"type":47,"value":2634},{"type":41,"tag":191,"props":8326,"children":8327},{"style":204},[8328],{"type":47,"value":8243},{"type":41,"tag":191,"props":8330,"children":8331},{"class":193,"line":258},[8332,8336,8340,8344,8348,8353,8357,8361,8365,8369,8373,8377,8381,8385,8389,8393,8397,8401,8406,8410],{"type":41,"tag":191,"props":8333,"children":8334},{"style":204},[8335],{"type":47,"value":6286},{"type":41,"tag":191,"props":8337,"children":8338},{"style":204},[8339],{"type":47,"value":7728},{"type":41,"tag":191,"props":8341,"children":8342},{"style":198},[8343],{"type":47,"value":8167},{"type":41,"tag":191,"props":8345,"children":8346},{"style":204},[8347],{"type":47,"value":178},{"type":41,"tag":191,"props":8349,"children":8350},{"style":1240},[8351],{"type":47,"value":8352}," N+3",{"type":41,"tag":191,"props":8354,"children":8355},{"style":204},[8356],{"type":47,"value":7747},{"type":41,"tag":191,"props":8358,"children":8359},{"style":198},[8360],{"type":47,"value":8185},{"type":41,"tag":191,"props":8362,"children":8363},{"style":204},[8364],{"type":47,"value":178},{"type":41,"tag":191,"props":8366,"children":8367},{"style":1240},[8368],{"type":47,"value":8194},{"type":41,"tag":191,"props":8370,"children":8371},{"style":204},[8372],{"type":47,"value":7747},{"type":41,"tag":191,"props":8374,"children":8375},{"style":198},[8376],{"type":47,"value":8203},{"type":41,"tag":191,"props":8378,"children":8379},{"style":204},[8380],{"type":47,"value":178},{"type":41,"tag":191,"props":8382,"children":8383},{"style":1240},[8384],{"type":47,"value":7816},{"type":41,"tag":191,"props":8386,"children":8387},{"style":204},[8388],{"type":47,"value":7747},{"type":41,"tag":191,"props":8390,"children":8391},{"style":198},[8392],{"type":47,"value":8221},{"type":41,"tag":191,"props":8394,"children":8395},{"style":204},[8396],{"type":47,"value":178},{"type":41,"tag":191,"props":8398,"children":8399},{"style":204},[8400],{"type":47,"value":2624},{"type":41,"tag":191,"props":8402,"children":8403},{"style":1240},[8404],{"type":47,"value":8405},"DMCQ adjacent mode (alternative signal) if confusion mode regresses or collapses",{"type":41,"tag":191,"props":8407,"children":8408},{"style":204},[8409],{"type":47,"value":2634},{"type":41,"tag":191,"props":8411,"children":8412},{"style":204},[8413],{"type":47,"value":8243},{"type":41,"tag":191,"props":8415,"children":8416},{"class":193,"line":280},[8417,8421,8425,8429,8433,8438,8442,8446,8450,8454,8458,8462,8466,8471,8475,8479,8483,8487,8492,8496],{"type":41,"tag":191,"props":8418,"children":8419},{"style":204},[8420],{"type":47,"value":6286},{"type":41,"tag":191,"props":8422,"children":8423},{"style":204},[8424],{"type":47,"value":7728},{"type":41,"tag":191,"props":8426,"children":8427},{"style":198},[8428],{"type":47,"value":8167},{"type":41,"tag":191,"props":8430,"children":8431},{"style":204},[8432],{"type":47,"value":178},{"type":41,"tag":191,"props":8434,"children":8435},{"style":1240},[8436],{"type":47,"value":8437}," N+4",{"type":41,"tag":191,"props":8439,"children":8440},{"style":204},[8441],{"type":47,"value":7747},{"type":41,"tag":191,"props":8443,"children":8444},{"style":198},[8445],{"type":47,"value":8185},{"type":41,"tag":191,"props":8447,"children":8448},{"style":204},[8449],{"type":47,"value":178},{"type":41,"tag":191,"props":8451,"children":8452},{"style":1240},[8453],{"type":47,"value":8194},{"type":41,"tag":191,"props":8455,"children":8456},{"style":204},[8457],{"type":47,"value":7747},{"type":41,"tag":191,"props":8459,"children":8460},{"style":198},[8461],{"type":47,"value":8203},{"type":41,"tag":191,"props":8463,"children":8464},{"style":204},[8465],{"type":47,"value":178},{"type":41,"tag":191,"props":8467,"children":8468},{"style":1240},[8469],{"type":47,"value":8470}," ddm-training-config-change",{"type":41,"tag":191,"props":8472,"children":8473},{"style":204},[8474],{"type":47,"value":7747},{"type":41,"tag":191,"props":8476,"children":8477},{"style":198},[8478],{"type":47,"value":8221},{"type":41,"tag":191,"props":8480,"children":8481},{"style":204},[8482],{"type":47,"value":178},{"type":41,"tag":191,"props":8484,"children":8485},{"style":204},[8486],{"type":47,"value":2624},{"type":41,"tag":191,"props":8488,"children":8489},{"style":1240},[8490],{"type":47,"value":8491},"RandomResize bilinear to improve DDM generalization",{"type":41,"tag":191,"props":8493,"children":8494},{"style":204},[8495],{"type":47,"value":2634},{"type":41,"tag":191,"props":8497,"children":8498},{"style":204},[8499],{"type":47,"value":8243},{"type":41,"tag":61,"props":8501,"children":8502},{},[8503,8505,8510],{"type":47,"value":8504},"Each remaining slot must propose a ",{"type":41,"tag":67,"props":8506,"children":8507},{},[8508],{"type":47,"value":8509},"distinct",{"type":47,"value":8511}," action category or value. Repeating the same category+value does not advance the budget.",{"type":41,"tag":6750,"props":8513,"children":8515},{"id":8514},"priority-1-eval-config-change",[8516],{"type":47,"value":8517},"Priority 1: eval-config-change",{"type":41,"tag":61,"props":8519,"children":8520},{},[8521,8526,8528,8534],{"type":41,"tag":67,"props":8522,"children":8523},{},[8524],{"type":47,"value":8525},"1a. DDM threshold tuning:",{"type":47,"value":8527}," Under-seg (missing actions) → lower by 0.05–0.10 (min 0.35). Over-seg (duplicates) → raise by 0.05. Update ",{"type":41,"tag":91,"props":8529,"children":8531},{"className":8530},[],[8532],{"type":47,"value":8533},"ddm_threshold",{"type":47,"value":8535}," to the single RCA-recommended value. → Step 7b → back to Step 8a.",{"type":41,"tag":61,"props":8537,"children":8538},{},[8539,8544,8546,8551,8553,8558],{"type":41,"tag":67,"props":8540,"children":8541},{},[8542],{"type":47,"value":8543},"1b. Wrong VLM inference path:",{"type":47,"value":8545}," Fix ",{"type":41,"tag":91,"props":8547,"children":8549},{"className":8548},[],[8550],{"type":47,"value":4450},{"type":47,"value":8552}," (and ",{"type":41,"tag":91,"props":8554,"children":8556},{"className":8555},[],[8557],{"type":47,"value":4420},{"type":47,"value":8559}," if LoRA). → Step 7 (both evals) → back to Step 8a.",{"type":41,"tag":6750,"props":8561,"children":8563},{"id":8562},"priority-2-ddm-training-config-change",[8564],{"type":47,"value":8565},"Priority 2: DDM training-config-change",{"type":41,"tag":61,"props":8567,"children":8568},{},[8569,8571,8577,8579,8584,8586,8591],{"type":47,"value":8570},"Apply RCA changes (epochs, resolution, batch_size) to ",{"type":41,"tag":91,"props":8572,"children":8574},{"className":8573},[],[8575],{"type":47,"value":8576},"ddm_train_config.yaml",{"type":47,"value":8578},". Increment ",{"type":41,"tag":91,"props":8580,"children":8582},{"className":8581},[],[8583],{"type":47,"value":3069},{"type":47,"value":8585},". → Step 5. DDM retraining with more data is ",{"type":41,"tag":91,"props":8587,"children":8589},{"className":8588},[],[8590],{"type":47,"value":3355},{"type":47,"value":136},{"type":41,"tag":6750,"props":8593,"children":8595},{"id":8594},"priority-3-vlm-training-config-change-medium-cost-retrain-vlm-only",[8596],{"type":47,"value":8597},"Priority 3: VLM training-config-change (medium cost — retrain VLM only)",{"type":41,"tag":61,"props":8599,"children":8600},{},[8601,8606],{"type":41,"tag":67,"props":8602,"children":8603},{},[8604],{"type":47,"value":8605},"When both LR and confusion_map (augment-config-change) are flagged by RCA:",{"type":47,"value":8607}," apply the LR fix first (this iteration); only add\u002Fextend confusion_map next iteration if confusion persists.",{"type":41,"tag":61,"props":8609,"children":8610},{},[8611,8613,8618],{"type":47,"value":8612},"Apply RCA-recommended config changes to ",{"type":41,"tag":91,"props":8614,"children":8616},{"className":8615},[],[8617],{"type":47,"value":3778},{"type":47,"value":8619},". Table = pattern → key path only; RCA value is authoritative:",{"type":41,"tag":438,"props":8621,"children":8622},{},[8623,8644],{"type":41,"tag":442,"props":8624,"children":8625},{},[8626],{"type":41,"tag":446,"props":8627,"children":8628},{},[8629,8634],{"type":41,"tag":450,"props":8630,"children":8631},{},[8632],{"type":47,"value":8633},"RCA pattern",{"type":41,"tag":450,"props":8635,"children":8636},{},[8637,8639],{"type":47,"value":8638},"Config key path(s) in ",{"type":41,"tag":91,"props":8640,"children":8642},{"className":8641},[],[8643],{"type":47,"value":3778},{"type":41,"tag":466,"props":8645,"children":8646},{},[8647,8685,8745,8814],{"type":41,"tag":446,"props":8648,"children":8649},{},[8650,8655],{"type":41,"tag":473,"props":8651,"children":8652},{},[8653],{"type":47,"value":8654},"Pattern 8 — fps\u002Fmax_frames mismatch",{"type":41,"tag":473,"props":8656,"children":8657},{},[8658,8664,8665,8671,8672,8678,8679],{"type":41,"tag":91,"props":8659,"children":8661},{"className":8660},[],[8662],{"type":47,"value":8663},"custom.vision.fps",{"type":47,"value":655},{"type":41,"tag":91,"props":8666,"children":8668},{"className":8667},[],[8669],{"type":47,"value":8670},"custom.vision.max_frames",{"type":47,"value":655},{"type":41,"tag":91,"props":8673,"children":8675},{"className":8674},[],[8676],{"type":47,"value":8677},"custom.vision.total_pixels",{"type":47,"value":655},{"type":41,"tag":91,"props":8680,"children":8682},{"className":8681},[],[8683],{"type":47,"value":8684},"policy.model_max_length",{"type":41,"tag":446,"props":8686,"children":8687},{},[8688,8693],{"type":41,"tag":473,"props":8689,"children":8690},{},[8691],{"type":47,"value":8692},"Pattern 5a — overfitting",{"type":41,"tag":473,"props":8694,"children":8695},{},[8696,8698,8704,8705,8711,8713,8719,8721,8727,8729,8735,8737,8743],{"type":47,"value":8697},"Full FT: ",{"type":41,"tag":91,"props":8699,"children":8701},{"className":8700},[],[8702],{"type":47,"value":8703},"train.epoch",{"type":47,"value":655},{"type":41,"tag":91,"props":8706,"children":8708},{"className":8707},[],[8709],{"type":47,"value":8710},"train.optm_lr",{"type":47,"value":8712},"; enable ",{"type":41,"tag":91,"props":8714,"children":8716},{"className":8715},[],[8717],{"type":47,"value":8718},"train.validation_step",{"type":47,"value":8720},". LoRA: reduce ",{"type":41,"tag":91,"props":8722,"children":8724},{"className":8723},[],[8725],{"type":47,"value":8726},"policy.lora.r",{"type":47,"value":8728}," or raise ",{"type":41,"tag":91,"props":8730,"children":8732},{"className":8731},[],[8733],{"type":47,"value":8734},"policy.lora.lora_dropout",{"type":47,"value":8736}," (do NOT lower ",{"type":41,"tag":91,"props":8738,"children":8740},{"className":8739},[],[8741],{"type":47,"value":8742},"policy.lora.lora_alpha",{"type":47,"value":8744}," for this pattern).",{"type":41,"tag":446,"props":8746,"children":8747},{},[8748,8753],{"type":41,"tag":473,"props":8749,"children":8750},{},[8751],{"type":47,"value":8752},"Pattern 5b — underfitting",{"type":41,"tag":473,"props":8754,"children":8755},{},[8756,8757,8762,8763,8768,8770,8776,8778,8783,8785,8791,8793,8798,8800,8805,8807,8812],{"type":47,"value":8697},{"type":41,"tag":91,"props":8758,"children":8760},{"className":8759},[],[8761],{"type":47,"value":8703},{"type":47,"value":655},{"type":41,"tag":91,"props":8764,"children":8766},{"className":8765},[],[8767],{"type":47,"value":8710},{"type":47,"value":8769},". LoRA priority order: 1) if ",{"type":41,"tag":91,"props":8771,"children":8773},{"className":8772},[],[8774],{"type":47,"value":8775},"optm_lr ≤ 5e-6",{"type":47,"value":8777}," (e.g. the full-FT small-data value mis-applied to LoRA), raise to ~1.5e-5 FIRST — this is the dominant underfit lever; 2) raise ",{"type":41,"tag":91,"props":8779,"children":8781},{"className":8780},[],[8782],{"type":47,"value":8742},{"type":47,"value":8784}," to reach ",{"type":41,"tag":91,"props":8786,"children":8788},{"className":8787},[],[8789],{"type":47,"value":8790},"effective_scaling = lora_alpha \u002F r ≥ 32",{"type":47,"value":8792},"; 3) raise ",{"type":41,"tag":91,"props":8794,"children":8796},{"className":8795},[],[8797],{"type":47,"value":8703},{"type":47,"value":8799}," (count is dataset-specific — extend until the loss curve plateaus); 4) raise ",{"type":41,"tag":91,"props":8801,"children":8803},{"className":8802},[],[8804],{"type":47,"value":8726},{"type":47,"value":8806}," only as a last resort. Never bundle an alpha change with an ",{"type":41,"tag":91,"props":8808,"children":8810},{"className":8809},[],[8811],{"type":47,"value":1249},{"type":47,"value":8813}," change in the same iteration.",{"type":41,"tag":446,"props":8815,"children":8816},{},[8817,8822],{"type":41,"tag":473,"props":8818,"children":8819},{},[8820],{"type":47,"value":8821},"Pattern 9 — model collapse",{"type":41,"tag":473,"props":8823,"children":8824},{},[8825,8827,8833,8835,8840,8842,8847,8849,8854],{"type":47,"value":8826},"Non-SOP collapse → reduce ",{"type":41,"tag":91,"props":8828,"children":8830},{"className":8829},[],[8831],{"type":47,"value":8832},"dynamic_mcq.num_neg",{"type":47,"value":8834}," (and DS \u002F EN non-SOP weights); LR-aggressive collapse → reduce ",{"type":41,"tag":91,"props":8836,"children":8838},{"className":8837},[],[8839],{"type":47,"value":3652},{"type":47,"value":8841},", raise ",{"type":41,"tag":91,"props":8843,"children":8845},{"className":8844},[],[8846],{"type":47,"value":3673},{"type":47,"value":8848},"; LoRA over-scaling collapse → reduce ",{"type":41,"tag":91,"props":8850,"children":8852},{"className":8851},[],[8853],{"type":47,"value":8742},{"type":47,"value":136},{"type":41,"tag":61,"props":8856,"children":8857},{},[8858,8859,8864,8866,8871],{"type":47,"value":2532},{"type":41,"tag":91,"props":8860,"children":8862},{"className":8861},[],[8863],{"type":47,"value":4231},{"type":47,"value":8865},".\n→ ",{"type":41,"tag":67,"props":8867,"children":8868},{},[8869],{"type":47,"value":8870},"Go to Step 6",{"type":47,"value":8872}," (retrain VLM + merge if LoRA, then re-eval both)",{"type":41,"tag":6750,"props":8874,"children":8876},{"id":8875},"priority-4-augment-config-change-expensive-re-augment-and-retrain-vlm",[8877],{"type":47,"value":8878},"Priority 4: augment-config-change (expensive — re-augment AND retrain VLM)",{"type":41,"tag":61,"props":8880,"children":8881},{},[8882,8884,8889,8891,8896],{"type":47,"value":8883},"Apply config fixes to ",{"type":41,"tag":91,"props":8885,"children":8887},{"className":8886},[],[8888],{"type":47,"value":2569},{"type":47,"value":8890},". See ",{"type":41,"tag":91,"props":8892,"children":8894},{"className":8893},[],[8895],{"type":47,"value":1195},{"type":47,"value":8897},". Key rules:",{"type":41,"tag":78,"props":8899,"children":8900},{},[8901,8917,8933],{"type":41,"tag":82,"props":8902,"children":8903},{},[8904,8915],{"type":41,"tag":67,"props":8905,"children":8906},{},[8907,8909],{"type":47,"value":8908},"DMCQ ",{"type":41,"tag":91,"props":8910,"children":8912},{"className":8911},[],[8913],{"type":47,"value":8914},"num_hard_neg",{"type":47,"value":8916},": 1 for ≤ 3 pairs; 0 for > 3 pairs.",{"type":41,"tag":82,"props":8918,"children":8919},{},[8920,8931],{"type":41,"tag":67,"props":8921,"children":8922},{},[8923,8925],{"type":47,"value":8924},"MCQ ",{"type":41,"tag":91,"props":8926,"children":8928},{"className":8927},[],[8929],{"type":47,"value":8930},"max_chunk_len",{"type":47,"value":8932},": keep at 2; raise to 3 only if DDM under-segments 3+ chunks AND E2E shows MISSING errors.",{"type":41,"tag":82,"props":8934,"children":8935},{},[8936,8941,8943,8949],{"type":41,"tag":67,"props":8937,"children":8938},{},[8939],{"type":47,"value":8940},"GQAs",{"type":47,"value":8942},": always ",{"type":41,"tag":91,"props":8944,"children":8946},{"className":8945},[],[8947],{"type":47,"value":8948},"enable: true",{"type":47,"value":8950},"; carry Step 4 backend settings forward.",{"type":41,"tag":61,"props":8952,"children":8953},{},[8954,8959,8961,8966,8968,8974],{"type":41,"tag":67,"props":8955,"children":8956},{},[8957],{"type":47,"value":8958},"Building the confusion_map:",{"type":47,"value":8960}," Run ",{"type":41,"tag":91,"props":8962,"children":8964},{"className":8963},[],[8965],{"type":47,"value":5359},{"type":47,"value":8967}," on by-action results; use only pairs from ",{"type":41,"tag":91,"props":8969,"children":8971},{"className":8970},[],[8972],{"type":47,"value":8973},"Confusion Pairs",{"type":47,"value":8975}," output. Start with 1–2 dominant pairs; expand only if they persist.",{"type":41,"tag":61,"props":8977,"children":8978},{},[8979,8980,8986,8988,8993,8994,8999],{"type":47,"value":2532},{"type":41,"tag":91,"props":8981,"children":8983},{"className":8982},[],[8984],{"type":47,"value":8985},"augment_config_version",{"type":47,"value":8987}," and generate a new ",{"type":41,"tag":91,"props":8989,"children":8991},{"className":8990},[],[8992],{"type":47,"value":2538},{"type":47,"value":8865},{"type":41,"tag":67,"props":8995,"children":8996},{},[8997],{"type":47,"value":8998},"Go to Step 4",{"type":47,"value":9000}," (re-augment, then retrain VLM + merge, then re-eval both)",{"type":41,"tag":61,"props":9002,"children":9003},{},[9004],{"type":47,"value":9005},"augment-config-change does NOT require DDM retraining.",{"type":41,"tag":6750,"props":9007,"children":9009},{"id":9008},"priority-5-code-change",[9010],{"type":47,"value":9011},"Priority 5: code-change",{"type":41,"tag":61,"props":9013,"children":9014},{},[9015,9017,9022,9024,9030,9031,9037,9039],{"type":47,"value":9016},"Copy file to ",{"type":41,"tag":91,"props":9018,"children":9020},{"className":9019},[],[9021],{"type":47,"value":833},{"type":47,"value":9023},", fix it, wire via env var (",{"type":41,"tag":91,"props":9025,"children":9027},{"className":9026},[],[9028],{"type":47,"value":9029},"SOP_MONITORING_PATH",{"type":47,"value":655},{"type":41,"tag":91,"props":9032,"children":9034},{"className":9033},[],[9035],{"type":47,"value":9036},"DDM_BASE_PATH_HOST",{"type":47,"value":9038},", etc.) or by mounting the override into the docker container. Re-run affected phase. ",{"type":41,"tag":67,"props":9040,"children":9041},{},[9042,9044,9049],{"type":47,"value":9043},"Never modify ",{"type":41,"tag":91,"props":9045,"children":9047},{"className":9046},[],[9048],{"type":47,"value":134},{"type":47,"value":136},{"type":41,"tag":6750,"props":9051,"children":9053},{"id":9052},"priority-6-manual",[9054],{"type":47,"value":9055},"Priority 6: manual",{"type":41,"tag":61,"props":9057,"children":9058},{},[9059,9061],{"type":47,"value":9060},"Log in final report. ",{"type":41,"tag":67,"props":9062,"children":9063},{},[9064],{"type":47,"value":9065},"Do NOT block. Continue with other findings.",{"type":41,"tag":138,"props":9067,"children":9069},{"id":9068},"_8d-worked-example-the-canonical-iteration-loop",[9070],{"type":47,"value":9071},"8d. Worked example — the canonical iteration loop",{"type":41,"tag":180,"props":9073,"children":9076},{"className":9074,"code":9075,"language":47},[1051],"iter1 (substantive):\n  Phase 1–5 (import → augment → DDM train → VLM train → eval)\n  Step 7c: cp -a eval job dirs → iter1\u002Fby_action\u002F + iter1\u002Fe2e\u002F   # ← snapshot, immediately\n           append eval_history[0]; keep eval_outputs pointer; write progress.md\u002Fhtml\n  Step 8a.0: bookkeeping gate passes (1 eval, 1 row, snapshots present, 0 failed-without-RCA yet)\n  Step 8a.1: criteria not met\n  Step 8b: delegate \u002Fsop-rca → write iter1\u002Frca_report.md\n           append rca_reports[0]; phase_status.rca: done\n           rca_runs_completed: 0 → 1\n  Step 8c: pick typed_action from rca_reports[0].typed_actions\n           e.g. {action_type: augment-config-change, pattern: 2}\n  → iter2\n\niter2 (substantive):\n  Phase 2 (re-augment) → Phase 4 (retrain VLM) → Phase 5 (re-eval)\n  append eval_history[1]\n  Step 8a.0: gate passes (2 evals, 2 rows, 1 failed eval == 1 RCA run)\n  Step 8a.1: criteria not met\n  Step 8b: delegate \u002Fsop-rca → iter2\u002Frca_report.md ; rca_runs_completed: 1 → 2\n  Step 8c: typed_action = {eval-config-change, lower ddm_threshold to 0.50}\n  → iter3 (eval-only)\n\niter3 (eval-only — threshold change, budget NOT incremented):\n  Phase 7b only (re-eval E2E at thr=0.50; no retrain, no config snapshot)\n  Step 7c: cp -a e2e job dir → iter3\u002Fe2e\u002F   # ← eval-only STILL gets a folder + snapshot\n           append eval_history[2] (ddm_threshold=0.50 in the row); write progress.md\u002Fhtml\n  Step 8a.0: gate passes (3 evals, 3 rows, iter3\u002Fe2e snapshot present, 2 failed == 2 RCA)\n  Step 8a.1: criteria not met\n  Step 8b: delegate \u002Fsop-rca on the new result → rca_runs_completed: 2 → 3   # ← NOT skipped\n  Step 8c: pick next typed_action\n  → iter4\n\n...\n\niterN (criteria met):\n  Step 7c: snapshot eval dir(s) → iterN\u002F{by_action,e2e}\u002F; append eval_history[...]; write progress\n  Step 8a.0: gate passes (snapshots present, rows current)\n  Step 8a.1: all_met → SUCCESS → Step 9\n",[9077],{"type":41,"tag":91,"props":9078,"children":9079},{"__ignoreMap":185},[9080],{"type":47,"value":9075},{"type":41,"tag":802,"props":9082,"children":9083},{},[],{"type":41,"tag":50,"props":9085,"children":9087},{"id":9086},"step-9-final-report",[9088],{"type":47,"value":9089},"Step 9: Final Report",{"type":41,"tag":138,"props":9091,"children":9093},{"id":9092},"checkpoint-disk-cleanup-run-after-each-vlm-training-phase",[9094],{"type":47,"value":9095},"Checkpoint Disk Cleanup (run after each VLM training phase)",{"type":41,"tag":61,"props":9097,"children":9098},{},[9099],{"type":47,"value":9100},"After each VLM training phase, delete results directories from non-current jobs:",{"type":41,"tag":180,"props":9102,"children":9104},{"className":1217,"code":9103,"language":1219,"meta":185,"style":185},"KEEP_JOBS=(\"${VLM_JOB_ID}\" \"${PREV_BEST_JOB_ID}\")\nfor DIR in \u003Crun_dir>\u002Fresults\u002F*\u002F; do\n  JOB=$(basename \"$DIR\")\n  if [[ ! \" ${KEEP_JOBS[@]} \" =~ \" ${JOB} \" ]] && [[ \"$JOB\" != \"${DDM_JOB_ID}\" ]]; then\n    rm -rf \"$DIR\"\n  fi\ndone\n",[9105],{"type":41,"tag":91,"props":9106,"children":9107},{"__ignoreMap":185},[9108,9154,9201,9236,9355,9380,9388],{"type":41,"tag":191,"props":9109,"children":9110},{"class":193,"line":194},[9111,9116,9121,9126,9131,9136,9141,9146,9150],{"type":41,"tag":191,"props":9112,"children":9113},{"style":1246},[9114],{"type":47,"value":9115},"KEEP_JOBS",{"type":41,"tag":191,"props":9117,"children":9118},{"style":204},[9119],{"type":47,"value":9120},"=(",{"type":41,"tag":191,"props":9122,"children":9123},{"style":204},[9124],{"type":47,"value":9125},"\"${",{"type":41,"tag":191,"props":9127,"children":9128},{"style":1246},[9129],{"type":47,"value":9130},"VLM_JOB_ID",{"type":41,"tag":191,"props":9132,"children":9133},{"style":204},[9134],{"type":47,"value":9135},"}\"",{"type":41,"tag":191,"props":9137,"children":9138},{"style":204},[9139],{"type":47,"value":9140}," \"${",{"type":41,"tag":191,"props":9142,"children":9143},{"style":1246},[9144],{"type":47,"value":9145},"PREV_BEST_JOB_ID",{"type":41,"tag":191,"props":9147,"children":9148},{"style":204},[9149],{"type":47,"value":9135},{"type":41,"tag":191,"props":9151,"children":9152},{"style":204},[9153],{"type":47,"value":4661},{"type":41,"tag":191,"props":9155,"children":9156},{"class":193,"line":210},[9157,9163,9168,9173,9177,9182,9186,9191,9196],{"type":41,"tag":191,"props":9158,"children":9160},{"style":9159},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[9161],{"type":47,"value":9162},"for",{"type":41,"tag":191,"props":9164,"children":9165},{"style":1246},[9166],{"type":47,"value":9167}," DIR ",{"type":41,"tag":191,"props":9169,"children":9170},{"style":9159},[9171],{"type":47,"value":9172},"in",{"type":41,"tag":191,"props":9174,"children":9175},{"style":204},[9176],{"type":47,"value":1237},{"type":41,"tag":191,"props":9178,"children":9179},{"style":1240},[9180],{"type":47,"value":9181},"run_dir",{"type":41,"tag":191,"props":9183,"children":9184},{"style":204},[9185],{"type":47,"value":1254},{"type":41,"tag":191,"props":9187,"children":9188},{"style":1240},[9189],{"type":47,"value":9190},"\u002Fresults\u002F*\u002F",{"type":41,"tag":191,"props":9192,"children":9193},{"style":204},[9194],{"type":47,"value":9195},";",{"type":41,"tag":191,"props":9197,"children":9198},{"style":9159},[9199],{"type":47,"value":9200}," do\n",{"type":41,"tag":191,"props":9202,"children":9203},{"class":193,"line":235},[9204,9209,9214,9219,9223,9228,9232],{"type":41,"tag":191,"props":9205,"children":9206},{"style":1246},[9207],{"type":47,"value":9208},"  JOB",{"type":41,"tag":191,"props":9210,"children":9211},{"style":204},[9212],{"type":47,"value":9213},"=$(",{"type":41,"tag":191,"props":9215,"children":9216},{"style":1229},[9217],{"type":47,"value":9218},"basename",{"type":41,"tag":191,"props":9220,"children":9221},{"style":204},[9222],{"type":47,"value":2624},{"type":41,"tag":191,"props":9224,"children":9225},{"style":1246},[9226],{"type":47,"value":9227},"$DIR",{"type":41,"tag":191,"props":9229,"children":9230},{"style":204},[9231],{"type":47,"value":2634},{"type":41,"tag":191,"props":9233,"children":9234},{"style":204},[9235],{"type":47,"value":4661},{"type":41,"tag":191,"props":9237,"children":9238},{"class":193,"line":258},[9239,9244,9249,9254,9258,9262,9266,9271,9275,9280,9284,9288,9293,9297,9301,9306,9310,9314,9318,9323,9327,9332,9336,9341,9345,9350],{"type":41,"tag":191,"props":9240,"children":9241},{"style":9159},[9242],{"type":47,"value":9243},"  if",{"type":41,"tag":191,"props":9245,"children":9246},{"style":204},[9247],{"type":47,"value":9248}," [[",{"type":41,"tag":191,"props":9250,"children":9251},{"style":204},[9252],{"type":47,"value":9253}," !",{"type":41,"tag":191,"props":9255,"children":9256},{"style":204},[9257],{"type":47,"value":2624},{"type":41,"tag":191,"props":9259,"children":9260},{"style":204},[9261],{"type":47,"value":1806},{"type":41,"tag":191,"props":9263,"children":9264},{"style":1246},[9265],{"type":47,"value":9115},{"type":41,"tag":191,"props":9267,"children":9268},{"style":204},[9269],{"type":47,"value":9270},"[@]}",{"type":41,"tag":191,"props":9272,"children":9273},{"style":204},[9274],{"type":47,"value":2624},{"type":41,"tag":191,"props":9276,"children":9277},{"style":204},[9278],{"type":47,"value":9279}," =~",{"type":41,"tag":191,"props":9281,"children":9282},{"style":204},[9283],{"type":47,"value":2624},{"type":41,"tag":191,"props":9285,"children":9286},{"style":204},[9287],{"type":47,"value":1806},{"type":41,"tag":191,"props":9289,"children":9290},{"style":1246},[9291],{"type":47,"value":9292},"JOB",{"type":41,"tag":191,"props":9294,"children":9295},{"style":204},[9296],{"type":47,"value":1816},{"type":41,"tag":191,"props":9298,"children":9299},{"style":204},[9300],{"type":47,"value":2624},{"type":41,"tag":191,"props":9302,"children":9303},{"style":204},[9304],{"type":47,"value":9305}," ]]",{"type":41,"tag":191,"props":9307,"children":9308},{"style":204},[9309],{"type":47,"value":6041},{"type":41,"tag":191,"props":9311,"children":9312},{"style":204},[9313],{"type":47,"value":9248},{"type":41,"tag":191,"props":9315,"children":9316},{"style":204},[9317],{"type":47,"value":2624},{"type":41,"tag":191,"props":9319,"children":9320},{"style":1246},[9321],{"type":47,"value":9322},"$JOB",{"type":41,"tag":191,"props":9324,"children":9325},{"style":204},[9326],{"type":47,"value":2634},{"type":41,"tag":191,"props":9328,"children":9329},{"style":204},[9330],{"type":47,"value":9331}," !=",{"type":41,"tag":191,"props":9333,"children":9334},{"style":204},[9335],{"type":47,"value":9140},{"type":41,"tag":191,"props":9337,"children":9338},{"style":1246},[9339],{"type":47,"value":9340},"DDM_JOB_ID",{"type":41,"tag":191,"props":9342,"children":9343},{"style":204},[9344],{"type":47,"value":9135},{"type":41,"tag":191,"props":9346,"children":9347},{"style":204},[9348],{"type":47,"value":9349}," ]];",{"type":41,"tag":191,"props":9351,"children":9352},{"style":9159},[9353],{"type":47,"value":9354}," then\n",{"type":41,"tag":191,"props":9356,"children":9357},{"class":193,"line":280},[9358,9363,9368,9372,9376],{"type":41,"tag":191,"props":9359,"children":9360},{"style":1229},[9361],{"type":47,"value":9362},"    rm",{"type":41,"tag":191,"props":9364,"children":9365},{"style":1240},[9366],{"type":47,"value":9367}," -rf",{"type":41,"tag":191,"props":9369,"children":9370},{"style":204},[9371],{"type":47,"value":2624},{"type":41,"tag":191,"props":9373,"children":9374},{"style":1246},[9375],{"type":47,"value":9227},{"type":41,"tag":191,"props":9377,"children":9378},{"style":204},[9379],{"type":47,"value":2709},{"type":41,"tag":191,"props":9381,"children":9382},{"class":193,"line":302},[9383],{"type":41,"tag":191,"props":9384,"children":9385},{"style":9159},[9386],{"type":47,"value":9387},"  fi\n",{"type":41,"tag":191,"props":9389,"children":9390},{"class":193,"line":324},[9391],{"type":41,"tag":191,"props":9392,"children":9393},{"style":9159},[9394],{"type":47,"value":9395},"done\n",{"type":41,"tag":138,"props":9397,"children":9399},{"id":9398},"mid-run-progress-file",[9400],{"type":47,"value":9401},"Mid-run Progress File",{"type":41,"tag":61,"props":9403,"children":9404},{},[9405,9407,9412,9414,9418],{"type":47,"value":9406},"Maintain ",{"type":41,"tag":91,"props":9408,"children":9410},{"className":9409},[],[9411],{"type":47,"value":3737},{"type":47,"value":9413}," after every phase: status, timestamp, key metric, checkpoint path, any auto-fix applied, iteration number, criteria gap remaining. This is a ",{"type":41,"tag":67,"props":9415,"children":9416},{},[9417],{"type":47,"value":6648},{"type":47,"value":9419}," (created in Step 2). The Step 8a.0 gate refuses to advance if it is missing or stale.",{"type":41,"tag":138,"props":9421,"children":9423},{"id":9422},"final-orchestration-report",[9424],{"type":47,"value":9425},"Final Orchestration Report",{"type":41,"tag":61,"props":9427,"children":9428},{},[9429,9430,9436],{"type":47,"value":2879},{"type":41,"tag":91,"props":9431,"children":9433},{"className":9432},[],[9434],{"type":47,"value":9435},"\u003Crun_dir>\u002Forchestrator_report.md",{"type":47,"value":178},{"type":41,"tag":180,"props":9438,"children":9442},{"className":9439,"code":9440,"language":9441,"meta":185,"style":185},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# SOP Fine-tuning Orchestration Report\n\n**Run ID:** \u003Crun_id>\n**Dataset:** \u003Cdataset_path>\n**Status:** SUCCESS ✅ | PARTIAL ⚠️ | NEEDS_HUMAN 🔴\n**Total iterations:** N\n**Wall-clock time:** X hr Y min\n\n## Results per Iteration\n\n| Iter | DDM F1 | By-action | E2E action | E2E seq | DDM threshold | Changes |\n|------|--------|-----------|------------|---------|---------------|---------|\n| 1    | 0.412  | 26.7%     | 67.1%      | 0.0%    | 0.60          | baseline |\n| 2    | 0.412  | 94.4%     | 94.3%      | 75.0%   | 0.45          | fps=4\u002Fframes=16, apply LoRA, threshold↓ |\n\n## Final Model Paths\n\n- DDM checkpoint: \u003Cpath\u002Fto\u002Fbest_ddm.ckpt>\n- VLM training mode: \u003Clora | full>\n- VLM inference path: \u003Cvlm_inference_path>          # what to pass to evaluation\n- VLM LoRA adapter: \u003Cvlm_adapter_path>              # omit this line for full fine-tune runs\n\n## Criteria Status\n\n| Criterion | Target | Achieved | Met? |\n|-----------|--------|----------|------|\n| DDM F1    | 0.60   | 0.412    | ❌   |\n| By-action | 0.90   | 94.4%    | ✅   |\n| E2E action| 0.90   | 94.3%    | ✅   |\n| E2E seq   | 0.70   | 75.0%    | ✅   |\n\n## Remaining Issues (manual action required)\n\n- DDM F1 = 0.412 (target 0.60): DDM trained on only 10 videos; recommend annotating 10+ more\n- Action 5 (black antenna) at 50%: black vs white antenna visually similar; add DMCQ confusion_map\n\n## What Was Fixed Automatically\n\n- Iteration 2: Applied fine-tuned LoRA (was using BASE model)\n- Iteration 2: Fixed fps=1\u002Fmax_frames=2 → fps=4\u002Fmax_frames=16\n- Iteration 2: Lowered DDM threshold 0.60 → 0.45 (reduced missing actions 46 → 8)\n","markdown",[9443],{"type":41,"tag":91,"props":9444,"children":9445},{"__ignoreMap":185},[9446,9459,9466,9498,9526,9547,9567,9588,9595,9608,9615,9687,9695,9765,9834,9841,9853,9860,9886,9921,9950,9979,9986,9998,10005,10048,10056,10099,10141,10182,10224,10231,10243,10250,10262,10274,10281,10293,10300,10312,10324],{"type":41,"tag":191,"props":9447,"children":9448},{"class":193,"line":194},[9449,9454],{"type":41,"tag":191,"props":9450,"children":9451},{"style":204},[9452],{"type":47,"value":9453},"# ",{"type":41,"tag":191,"props":9455,"children":9456},{"style":1229},[9457],{"type":47,"value":9458},"SOP Fine-tuning Orchestration Report\n",{"type":41,"tag":191,"props":9460,"children":9461},{"class":193,"line":210},[9462],{"type":41,"tag":191,"props":9463,"children":9464},{"emptyLinePlaceholder":6788},[9465],{"type":47,"value":6791},{"type":41,"tag":191,"props":9467,"children":9468},{"class":193,"line":235},[9469,9475,9481,9485,9489,9494],{"type":41,"tag":191,"props":9470,"children":9472},{"style":9471},"--shiki-light:#39ADB5;--shiki-light-font-weight:bold;--shiki-default:#89DDFF;--shiki-default-font-weight:bold;--shiki-dark:#89DDFF;--shiki-dark-font-weight:bold",[9473],{"type":47,"value":9474},"**",{"type":41,"tag":191,"props":9476,"children":9478},{"style":9477},"--shiki-light:#E53935;--shiki-light-font-weight:bold;--shiki-default:#F07178;--shiki-default-font-weight:bold;--shiki-dark:#F07178;--shiki-dark-font-weight:bold",[9479],{"type":47,"value":9480},"Run ID:",{"type":41,"tag":191,"props":9482,"children":9483},{"style":9471},[9484],{"type":47,"value":9474},{"type":41,"tag":191,"props":9486,"children":9487},{"style":204},[9488],{"type":47,"value":1237},{"type":41,"tag":191,"props":9490,"children":9491},{"style":198},[9492],{"type":47,"value":9493},"run_id",{"type":41,"tag":191,"props":9495,"children":9496},{"style":204},[9497],{"type":47,"value":1840},{"type":41,"tag":191,"props":9499,"children":9500},{"class":193,"line":258},[9501,9505,9510,9514,9518,9522],{"type":41,"tag":191,"props":9502,"children":9503},{"style":9471},[9504],{"type":47,"value":9474},{"type":41,"tag":191,"props":9506,"children":9507},{"style":9477},[9508],{"type":47,"value":9509},"Dataset:",{"type":41,"tag":191,"props":9511,"children":9512},{"style":9471},[9513],{"type":47,"value":9474},{"type":41,"tag":191,"props":9515,"children":9516},{"style":204},[9517],{"type":47,"value":1237},{"type":41,"tag":191,"props":9519,"children":9520},{"style":198},[9521],{"type":47,"value":1776},{"type":41,"tag":191,"props":9523,"children":9524},{"style":204},[9525],{"type":47,"value":1840},{"type":41,"tag":191,"props":9527,"children":9528},{"class":193,"line":280},[9529,9533,9538,9542],{"type":41,"tag":191,"props":9530,"children":9531},{"style":9471},[9532],{"type":47,"value":9474},{"type":41,"tag":191,"props":9534,"children":9535},{"style":9477},[9536],{"type":47,"value":9537},"Status:",{"type":41,"tag":191,"props":9539,"children":9540},{"style":9471},[9541],{"type":47,"value":9474},{"type":41,"tag":191,"props":9543,"children":9544},{"style":1246},[9545],{"type":47,"value":9546}," SUCCESS ✅ | PARTIAL ⚠️ | NEEDS_HUMAN 🔴\n",{"type":41,"tag":191,"props":9548,"children":9549},{"class":193,"line":302},[9550,9554,9559,9563],{"type":41,"tag":191,"props":9551,"children":9552},{"style":9471},[9553],{"type":47,"value":9474},{"type":41,"tag":191,"props":9555,"children":9556},{"style":9477},[9557],{"type":47,"value":9558},"Total iterations:",{"type":41,"tag":191,"props":9560,"children":9561},{"style":9471},[9562],{"type":47,"value":9474},{"type":41,"tag":191,"props":9564,"children":9565},{"style":1246},[9566],{"type":47,"value":6300},{"type":41,"tag":191,"props":9568,"children":9569},{"class":193,"line":324},[9570,9574,9579,9583],{"type":41,"tag":191,"props":9571,"children":9572},{"style":9471},[9573],{"type":47,"value":9474},{"type":41,"tag":191,"props":9575,"children":9576},{"style":9477},[9577],{"type":47,"value":9578},"Wall-clock time:",{"type":41,"tag":191,"props":9580,"children":9581},{"style":9471},[9582],{"type":47,"value":9474},{"type":41,"tag":191,"props":9584,"children":9585},{"style":1246},[9586],{"type":47,"value":9587}," X hr Y min\n",{"type":41,"tag":191,"props":9589,"children":9590},{"class":193,"line":342},[9591],{"type":41,"tag":191,"props":9592,"children":9593},{"emptyLinePlaceholder":6788},[9594],{"type":47,"value":6791},{"type":41,"tag":191,"props":9596,"children":9597},{"class":193,"line":365},[9598,9603],{"type":41,"tag":191,"props":9599,"children":9600},{"style":204},[9601],{"type":47,"value":9602},"## ",{"type":41,"tag":191,"props":9604,"children":9605},{"style":1229},[9606],{"type":47,"value":9607},"Results per Iteration\n",{"type":41,"tag":191,"props":9609,"children":9610},{"class":193,"line":387},[9611],{"type":41,"tag":191,"props":9612,"children":9613},{"emptyLinePlaceholder":6788},[9614],{"type":47,"value":6791},{"type":41,"tag":191,"props":9616,"children":9617},{"class":193,"line":409},[9618,9623,9628,9632,9637,9641,9646,9650,9655,9659,9664,9668,9673,9677,9682],{"type":41,"tag":191,"props":9619,"children":9620},{"style":204},[9621],{"type":47,"value":9622},"|",{"type":41,"tag":191,"props":9624,"children":9625},{"style":1246},[9626],{"type":47,"value":9627}," Iter ",{"type":41,"tag":191,"props":9629,"children":9630},{"style":204},[9631],{"type":47,"value":9622},{"type":41,"tag":191,"props":9633,"children":9634},{"style":1246},[9635],{"type":47,"value":9636}," DDM F1 ",{"type":41,"tag":191,"props":9638,"children":9639},{"style":204},[9640],{"type":47,"value":9622},{"type":41,"tag":191,"props":9642,"children":9643},{"style":1246},[9644],{"type":47,"value":9645}," By-action ",{"type":41,"tag":191,"props":9647,"children":9648},{"style":204},[9649],{"type":47,"value":9622},{"type":41,"tag":191,"props":9651,"children":9652},{"style":1246},[9653],{"type":47,"value":9654}," E2E action ",{"type":41,"tag":191,"props":9656,"children":9657},{"style":204},[9658],{"type":47,"value":9622},{"type":41,"tag":191,"props":9660,"children":9661},{"style":1246},[9662],{"type":47,"value":9663}," E2E seq ",{"type":41,"tag":191,"props":9665,"children":9666},{"style":204},[9667],{"type":47,"value":9622},{"type":41,"tag":191,"props":9669,"children":9670},{"style":1246},[9671],{"type":47,"value":9672}," DDM threshold ",{"type":41,"tag":191,"props":9674,"children":9675},{"style":204},[9676],{"type":47,"value":9622},{"type":41,"tag":191,"props":9678,"children":9679},{"style":1246},[9680],{"type":47,"value":9681}," Changes ",{"type":41,"tag":191,"props":9683,"children":9684},{"style":204},[9685],{"type":47,"value":9686},"|\n",{"type":41,"tag":191,"props":9688,"children":9689},{"class":193,"line":27},[9690],{"type":41,"tag":191,"props":9691,"children":9692},{"style":204},[9693],{"type":47,"value":9694},"|------|--------|-----------|------------|---------|---------------|---------|\n",{"type":41,"tag":191,"props":9696,"children":9697},{"class":193,"line":5765},[9698,9702,9707,9711,9716,9720,9725,9729,9734,9738,9743,9747,9752,9756,9761],{"type":41,"tag":191,"props":9699,"children":9700},{"style":204},[9701],{"type":47,"value":9622},{"type":41,"tag":191,"props":9703,"children":9704},{"style":1246},[9705],{"type":47,"value":9706}," 1    ",{"type":41,"tag":191,"props":9708,"children":9709},{"style":204},[9710],{"type":47,"value":9622},{"type":41,"tag":191,"props":9712,"children":9713},{"style":1246},[9714],{"type":47,"value":9715}," 0.412  ",{"type":41,"tag":191,"props":9717,"children":9718},{"style":204},[9719],{"type":47,"value":9622},{"type":41,"tag":191,"props":9721,"children":9722},{"style":1246},[9723],{"type":47,"value":9724}," 26.7%     ",{"type":41,"tag":191,"props":9726,"children":9727},{"style":204},[9728],{"type":47,"value":9622},{"type":41,"tag":191,"props":9730,"children":9731},{"style":1246},[9732],{"type":47,"value":9733}," 67.1%      ",{"type":41,"tag":191,"props":9735,"children":9736},{"style":204},[9737],{"type":47,"value":9622},{"type":41,"tag":191,"props":9739,"children":9740},{"style":1246},[9741],{"type":47,"value":9742}," 0.0%    ",{"type":41,"tag":191,"props":9744,"children":9745},{"style":204},[9746],{"type":47,"value":9622},{"type":41,"tag":191,"props":9748,"children":9749},{"style":1246},[9750],{"type":47,"value":9751}," 0.60          ",{"type":41,"tag":191,"props":9753,"children":9754},{"style":204},[9755],{"type":47,"value":9622},{"type":41,"tag":191,"props":9757,"children":9758},{"style":1246},[9759],{"type":47,"value":9760}," baseline ",{"type":41,"tag":191,"props":9762,"children":9763},{"style":204},[9764],{"type":47,"value":9686},{"type":41,"tag":191,"props":9766,"children":9767},{"class":193,"line":6880},[9768,9772,9777,9781,9785,9789,9794,9798,9803,9807,9812,9816,9821,9825,9830],{"type":41,"tag":191,"props":9769,"children":9770},{"style":204},[9771],{"type":47,"value":9622},{"type":41,"tag":191,"props":9773,"children":9774},{"style":1246},[9775],{"type":47,"value":9776}," 2    ",{"type":41,"tag":191,"props":9778,"children":9779},{"style":204},[9780],{"type":47,"value":9622},{"type":41,"tag":191,"props":9782,"children":9783},{"style":1246},[9784],{"type":47,"value":9715},{"type":41,"tag":191,"props":9786,"children":9787},{"style":204},[9788],{"type":47,"value":9622},{"type":41,"tag":191,"props":9790,"children":9791},{"style":1246},[9792],{"type":47,"value":9793}," 94.4%     ",{"type":41,"tag":191,"props":9795,"children":9796},{"style":204},[9797],{"type":47,"value":9622},{"type":41,"tag":191,"props":9799,"children":9800},{"style":1246},[9801],{"type":47,"value":9802}," 94.3%      ",{"type":41,"tag":191,"props":9804,"children":9805},{"style":204},[9806],{"type":47,"value":9622},{"type":41,"tag":191,"props":9808,"children":9809},{"style":1246},[9810],{"type":47,"value":9811}," 75.0%   ",{"type":41,"tag":191,"props":9813,"children":9814},{"style":204},[9815],{"type":47,"value":9622},{"type":41,"tag":191,"props":9817,"children":9818},{"style":1246},[9819],{"type":47,"value":9820}," 0.45          ",{"type":41,"tag":191,"props":9822,"children":9823},{"style":204},[9824],{"type":47,"value":9622},{"type":41,"tag":191,"props":9826,"children":9827},{"style":1246},[9828],{"type":47,"value":9829}," fps=4\u002Fframes=16, apply LoRA, threshold↓ ",{"type":41,"tag":191,"props":9831,"children":9832},{"style":204},[9833],{"type":47,"value":9686},{"type":41,"tag":191,"props":9835,"children":9836},{"class":193,"line":6889},[9837],{"type":41,"tag":191,"props":9838,"children":9839},{"emptyLinePlaceholder":6788},[9840],{"type":47,"value":6791},{"type":41,"tag":191,"props":9842,"children":9843},{"class":193,"line":6898},[9844,9848],{"type":41,"tag":191,"props":9845,"children":9846},{"style":204},[9847],{"type":47,"value":9602},{"type":41,"tag":191,"props":9849,"children":9850},{"style":1229},[9851],{"type":47,"value":9852},"Final Model Paths\n",{"type":41,"tag":191,"props":9854,"children":9855},{"class":193,"line":6907},[9856],{"type":41,"tag":191,"props":9857,"children":9858},{"emptyLinePlaceholder":6788},[9859],{"type":47,"value":6791},{"type":41,"tag":191,"props":9861,"children":9862},{"class":193,"line":6916},[9863,9868,9873,9877,9882],{"type":41,"tag":191,"props":9864,"children":9865},{"style":204},[9866],{"type":47,"value":9867},"-",{"type":41,"tag":191,"props":9869,"children":9870},{"style":1246},[9871],{"type":47,"value":9872}," DDM checkpoint: ",{"type":41,"tag":191,"props":9874,"children":9875},{"style":204},[9876],{"type":47,"value":6022},{"type":41,"tag":191,"props":9878,"children":9879},{"style":198},[9880],{"type":47,"value":9881},"path\u002Fto\u002Fbest_ddm.ckpt",{"type":41,"tag":191,"props":9883,"children":9884},{"style":204},[9885],{"type":47,"value":1840},{"type":41,"tag":191,"props":9887,"children":9888},{"class":193,"line":6925},[9889,9893,9898,9902,9907,9912,9917],{"type":41,"tag":191,"props":9890,"children":9891},{"style":204},[9892],{"type":47,"value":9867},{"type":41,"tag":191,"props":9894,"children":9895},{"style":1246},[9896],{"type":47,"value":9897}," VLM training mode: ",{"type":41,"tag":191,"props":9899,"children":9900},{"style":204},[9901],{"type":47,"value":6022},{"type":41,"tag":191,"props":9903,"children":9904},{"style":198},[9905],{"type":47,"value":9906},"lora",{"type":41,"tag":191,"props":9908,"children":9910},{"style":9909},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[9911],{"type":47,"value":1284},{"type":41,"tag":191,"props":9913,"children":9914},{"style":9909},[9915],{"type":47,"value":9916}," full",{"type":41,"tag":191,"props":9918,"children":9919},{"style":204},[9920],{"type":47,"value":1840},{"type":41,"tag":191,"props":9922,"children":9923},{"class":193,"line":6934},[9924,9928,9933,9937,9941,9945],{"type":41,"tag":191,"props":9925,"children":9926},{"style":204},[9927],{"type":47,"value":9867},{"type":41,"tag":191,"props":9929,"children":9930},{"style":1246},[9931],{"type":47,"value":9932}," VLM inference path: ",{"type":41,"tag":191,"props":9934,"children":9935},{"style":204},[9936],{"type":47,"value":6022},{"type":41,"tag":191,"props":9938,"children":9939},{"style":198},[9940],{"type":47,"value":4450},{"type":41,"tag":191,"props":9942,"children":9943},{"style":204},[9944],{"type":47,"value":1254},{"type":41,"tag":191,"props":9946,"children":9947},{"style":1246},[9948],{"type":47,"value":9949},"          # what to pass to evaluation\n",{"type":41,"tag":191,"props":9951,"children":9952},{"class":193,"line":6943},[9953,9957,9962,9966,9970,9974],{"type":41,"tag":191,"props":9954,"children":9955},{"style":204},[9956],{"type":47,"value":9867},{"type":41,"tag":191,"props":9958,"children":9959},{"style":1246},[9960],{"type":47,"value":9961}," VLM LoRA adapter: ",{"type":41,"tag":191,"props":9963,"children":9964},{"style":204},[9965],{"type":47,"value":6022},{"type":41,"tag":191,"props":9967,"children":9968},{"style":198},[9969],{"type":47,"value":4420},{"type":41,"tag":191,"props":9971,"children":9972},{"style":204},[9973],{"type":47,"value":1254},{"type":41,"tag":191,"props":9975,"children":9976},{"style":1246},[9977],{"type":47,"value":9978},"              # omit this line for full fine-tune runs\n",{"type":41,"tag":191,"props":9980,"children":9981},{"class":193,"line":6952},[9982],{"type":41,"tag":191,"props":9983,"children":9984},{"emptyLinePlaceholder":6788},[9985],{"type":47,"value":6791},{"type":41,"tag":191,"props":9987,"children":9988},{"class":193,"line":6961},[9989,9993],{"type":41,"tag":191,"props":9990,"children":9991},{"style":204},[9992],{"type":47,"value":9602},{"type":41,"tag":191,"props":9994,"children":9995},{"style":1229},[9996],{"type":47,"value":9997},"Criteria Status\n",{"type":41,"tag":191,"props":9999,"children":10000},{"class":193,"line":6970},[10001],{"type":41,"tag":191,"props":10002,"children":10003},{"emptyLinePlaceholder":6788},[10004],{"type":47,"value":6791},{"type":41,"tag":191,"props":10006,"children":10007},{"class":193,"line":6978},[10008,10012,10017,10021,10026,10030,10035,10039,10044],{"type":41,"tag":191,"props":10009,"children":10010},{"style":204},[10011],{"type":47,"value":9622},{"type":41,"tag":191,"props":10013,"children":10014},{"style":1246},[10015],{"type":47,"value":10016}," Criterion ",{"type":41,"tag":191,"props":10018,"children":10019},{"style":204},[10020],{"type":47,"value":9622},{"type":41,"tag":191,"props":10022,"children":10023},{"style":1246},[10024],{"type":47,"value":10025}," Target ",{"type":41,"tag":191,"props":10027,"children":10028},{"style":204},[10029],{"type":47,"value":9622},{"type":41,"tag":191,"props":10031,"children":10032},{"style":1246},[10033],{"type":47,"value":10034}," Achieved ",{"type":41,"tag":191,"props":10036,"children":10037},{"style":204},[10038],{"type":47,"value":9622},{"type":41,"tag":191,"props":10040,"children":10041},{"style":1246},[10042],{"type":47,"value":10043}," Met? ",{"type":41,"tag":191,"props":10045,"children":10046},{"style":204},[10047],{"type":47,"value":9686},{"type":41,"tag":191,"props":10049,"children":10050},{"class":193,"line":6987},[10051],{"type":41,"tag":191,"props":10052,"children":10053},{"style":204},[10054],{"type":47,"value":10055},"|-----------|--------|----------|------|\n",{"type":41,"tag":191,"props":10057,"children":10058},{"class":193,"line":6996},[10059,10063,10068,10072,10077,10081,10086,10090,10095],{"type":41,"tag":191,"props":10060,"children":10061},{"style":204},[10062],{"type":47,"value":9622},{"type":41,"tag":191,"props":10064,"children":10065},{"style":1246},[10066],{"type":47,"value":10067}," DDM F1    ",{"type":41,"tag":191,"props":10069,"children":10070},{"style":204},[10071],{"type":47,"value":9622},{"type":41,"tag":191,"props":10073,"children":10074},{"style":1246},[10075],{"type":47,"value":10076}," 0.60   ",{"type":41,"tag":191,"props":10078,"children":10079},{"style":204},[10080],{"type":47,"value":9622},{"type":41,"tag":191,"props":10082,"children":10083},{"style":1246},[10084],{"type":47,"value":10085}," 0.412    ",{"type":41,"tag":191,"props":10087,"children":10088},{"style":204},[10089],{"type":47,"value":9622},{"type":41,"tag":191,"props":10091,"children":10092},{"style":1246},[10093],{"type":47,"value":10094}," ❌   ",{"type":41,"tag":191,"props":10096,"children":10097},{"style":204},[10098],{"type":47,"value":9686},{"type":41,"tag":191,"props":10100,"children":10101},{"class":193,"line":7005},[10102,10106,10110,10114,10119,10123,10128,10132,10137],{"type":41,"tag":191,"props":10103,"children":10104},{"style":204},[10105],{"type":47,"value":9622},{"type":41,"tag":191,"props":10107,"children":10108},{"style":1246},[10109],{"type":47,"value":9645},{"type":41,"tag":191,"props":10111,"children":10112},{"style":204},[10113],{"type":47,"value":9622},{"type":41,"tag":191,"props":10115,"children":10116},{"style":1246},[10117],{"type":47,"value":10118}," 0.90   ",{"type":41,"tag":191,"props":10120,"children":10121},{"style":204},[10122],{"type":47,"value":9622},{"type":41,"tag":191,"props":10124,"children":10125},{"style":1246},[10126],{"type":47,"value":10127}," 94.4%    ",{"type":41,"tag":191,"props":10129,"children":10130},{"style":204},[10131],{"type":47,"value":9622},{"type":41,"tag":191,"props":10133,"children":10134},{"style":1246},[10135],{"type":47,"value":10136}," ✅   ",{"type":41,"tag":191,"props":10138,"children":10139},{"style":204},[10140],{"type":47,"value":9686},{"type":41,"tag":191,"props":10142,"children":10143},{"class":193,"line":7014},[10144,10148,10153,10157,10161,10165,10170,10174,10178],{"type":41,"tag":191,"props":10145,"children":10146},{"style":204},[10147],{"type":47,"value":9622},{"type":41,"tag":191,"props":10149,"children":10150},{"style":1246},[10151],{"type":47,"value":10152}," E2E action",{"type":41,"tag":191,"props":10154,"children":10155},{"style":204},[10156],{"type":47,"value":9622},{"type":41,"tag":191,"props":10158,"children":10159},{"style":1246},[10160],{"type":47,"value":10118},{"type":41,"tag":191,"props":10162,"children":10163},{"style":204},[10164],{"type":47,"value":9622},{"type":41,"tag":191,"props":10166,"children":10167},{"style":1246},[10168],{"type":47,"value":10169}," 94.3%    ",{"type":41,"tag":191,"props":10171,"children":10172},{"style":204},[10173],{"type":47,"value":9622},{"type":41,"tag":191,"props":10175,"children":10176},{"style":1246},[10177],{"type":47,"value":10136},{"type":41,"tag":191,"props":10179,"children":10180},{"style":204},[10181],{"type":47,"value":9686},{"type":41,"tag":191,"props":10183,"children":10184},{"class":193,"line":7023},[10185,10189,10194,10198,10203,10207,10212,10216,10220],{"type":41,"tag":191,"props":10186,"children":10187},{"style":204},[10188],{"type":47,"value":9622},{"type":41,"tag":191,"props":10190,"children":10191},{"style":1246},[10192],{"type":47,"value":10193}," E2E seq   ",{"type":41,"tag":191,"props":10195,"children":10196},{"style":204},[10197],{"type":47,"value":9622},{"type":41,"tag":191,"props":10199,"children":10200},{"style":1246},[10201],{"type":47,"value":10202}," 0.70   ",{"type":41,"tag":191,"props":10204,"children":10205},{"style":204},[10206],{"type":47,"value":9622},{"type":41,"tag":191,"props":10208,"children":10209},{"style":1246},[10210],{"type":47,"value":10211}," 75.0%    ",{"type":41,"tag":191,"props":10213,"children":10214},{"style":204},[10215],{"type":47,"value":9622},{"type":41,"tag":191,"props":10217,"children":10218},{"style":1246},[10219],{"type":47,"value":10136},{"type":41,"tag":191,"props":10221,"children":10222},{"style":204},[10223],{"type":47,"value":9686},{"type":41,"tag":191,"props":10225,"children":10226},{"class":193,"line":7031},[10227],{"type":41,"tag":191,"props":10228,"children":10229},{"emptyLinePlaceholder":6788},[10230],{"type":47,"value":6791},{"type":41,"tag":191,"props":10232,"children":10233},{"class":193,"line":7040},[10234,10238],{"type":41,"tag":191,"props":10235,"children":10236},{"style":204},[10237],{"type":47,"value":9602},{"type":41,"tag":191,"props":10239,"children":10240},{"style":1229},[10241],{"type":47,"value":10242},"Remaining Issues (manual action required)\n",{"type":41,"tag":191,"props":10244,"children":10245},{"class":193,"line":7049},[10246],{"type":41,"tag":191,"props":10247,"children":10248},{"emptyLinePlaceholder":6788},[10249],{"type":47,"value":6791},{"type":41,"tag":191,"props":10251,"children":10252},{"class":193,"line":7057},[10253,10257],{"type":41,"tag":191,"props":10254,"children":10255},{"style":204},[10256],{"type":47,"value":9867},{"type":41,"tag":191,"props":10258,"children":10259},{"style":1246},[10260],{"type":47,"value":10261}," DDM F1 = 0.412 (target 0.60): DDM trained on only 10 videos; recommend annotating 10+ more\n",{"type":41,"tag":191,"props":10263,"children":10264},{"class":193,"line":7065},[10265,10269],{"type":41,"tag":191,"props":10266,"children":10267},{"style":204},[10268],{"type":47,"value":9867},{"type":41,"tag":191,"props":10270,"children":10271},{"style":1246},[10272],{"type":47,"value":10273}," Action 5 (black antenna) at 50%: black vs white antenna visually similar; add DMCQ confusion_map\n",{"type":41,"tag":191,"props":10275,"children":10276},{"class":193,"line":7074},[10277],{"type":41,"tag":191,"props":10278,"children":10279},{"emptyLinePlaceholder":6788},[10280],{"type":47,"value":6791},{"type":41,"tag":191,"props":10282,"children":10283},{"class":193,"line":7083},[10284,10288],{"type":41,"tag":191,"props":10285,"children":10286},{"style":204},[10287],{"type":47,"value":9602},{"type":41,"tag":191,"props":10289,"children":10290},{"style":1229},[10291],{"type":47,"value":10292},"What Was Fixed Automatically\n",{"type":41,"tag":191,"props":10294,"children":10295},{"class":193,"line":7092},[10296],{"type":41,"tag":191,"props":10297,"children":10298},{"emptyLinePlaceholder":6788},[10299],{"type":47,"value":6791},{"type":41,"tag":191,"props":10301,"children":10302},{"class":193,"line":23},[10303,10307],{"type":41,"tag":191,"props":10304,"children":10305},{"style":204},[10306],{"type":47,"value":9867},{"type":41,"tag":191,"props":10308,"children":10309},{"style":1246},[10310],{"type":47,"value":10311}," Iteration 2: Applied fine-tuned LoRA (was using BASE model)\n",{"type":41,"tag":191,"props":10313,"children":10314},{"class":193,"line":7109},[10315,10319],{"type":41,"tag":191,"props":10316,"children":10317},{"style":204},[10318],{"type":47,"value":9867},{"type":41,"tag":191,"props":10320,"children":10321},{"style":1246},[10322],{"type":47,"value":10323}," Iteration 2: Fixed fps=1\u002Fmax_frames=2 → fps=4\u002Fmax_frames=16\n",{"type":41,"tag":191,"props":10325,"children":10326},{"class":193,"line":7118},[10327,10331],{"type":41,"tag":191,"props":10328,"children":10329},{"style":204},[10330],{"type":47,"value":9867},{"type":41,"tag":191,"props":10332,"children":10333},{"style":1246},[10334],{"type":47,"value":10335}," Iteration 2: Lowered DDM threshold 0.60 → 0.45 (reduced missing actions 46 → 8)\n",{"type":41,"tag":10337,"props":10338,"children":10339},"style",{},[10340],{"type":47,"value":10341},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":10343,"total":10496},[10344,10362,10379,10390,10402,10416,10429,10441,10454,10464,10478,10487],{"slug":10345,"name":10345,"fn":10346,"description":10347,"org":10348,"tags":10349,"stars":10359,"repoUrl":10360,"updatedAt":10361},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10350,10353,10356],{"name":10351,"slug":10352,"type":15},"Documentation","documentation",{"name":10354,"slug":10355,"type":15},"MCP","mcp",{"name":10357,"slug":10358,"type":15},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":10363,"name":10363,"fn":10364,"description":10365,"org":10366,"tags":10367,"stars":10376,"repoUrl":10377,"updatedAt":10378},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10368,10371,10374],{"name":10369,"slug":10370,"type":15},"Containers","containers",{"name":10372,"slug":10373,"type":15},"Deployment","deployment",{"name":10375,"slug":6438,"type":15},"Python",17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":10380,"name":10380,"fn":10381,"description":10382,"org":10383,"tags":10384,"stars":10376,"repoUrl":10377,"updatedAt":10389},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10385,10388],{"name":10386,"slug":10387,"type":15},"CI\u002FCD","ci-cd",{"name":10372,"slug":10373,"type":15},"2026-07-14T05:25:59.97109",{"slug":10391,"name":10391,"fn":10392,"description":10393,"org":10394,"tags":10395,"stars":10376,"repoUrl":10377,"updatedAt":10401},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10396,10397,10398],{"name":10386,"slug":10387,"type":15},{"name":10372,"slug":10373,"type":15},{"name":10399,"slug":10400,"type":15},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":10403,"name":10403,"fn":10404,"description":10405,"org":10406,"tags":10407,"stars":10376,"repoUrl":10377,"updatedAt":10415},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10408,10411,10412],{"name":10409,"slug":10410,"type":15},"Debugging","debugging",{"name":10399,"slug":10400,"type":15},{"name":10413,"slug":10414,"type":15},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":10417,"name":10417,"fn":10418,"description":10419,"org":10420,"tags":10421,"stars":10376,"repoUrl":10377,"updatedAt":10428},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10422,10425],{"name":10423,"slug":10424,"type":15},"Best Practices","best-practices",{"name":10426,"slug":10427,"type":15},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":10430,"name":10430,"fn":10431,"description":10432,"org":10433,"tags":10434,"stars":10376,"repoUrl":10377,"updatedAt":10440},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10435,10436,10439],{"name":17,"slug":18,"type":15},{"name":10437,"slug":10438,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:11.777011",{"slug":10442,"name":10442,"fn":10443,"description":10444,"org":10445,"tags":10446,"stars":10376,"repoUrl":10377,"updatedAt":10453},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10447,10450],{"name":10448,"slug":10449,"type":15},"QA","qa",{"name":10451,"slug":10452,"type":15},"Testing","testing","2026-07-14T05:25:53.673039",{"slug":10455,"name":10455,"fn":10456,"description":10457,"org":10458,"tags":10459,"stars":10376,"repoUrl":10377,"updatedAt":10463},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10460,10461],{"name":10372,"slug":10373,"type":15},{"name":10462,"slug":525,"type":15},"Infrastructure","2026-07-14T05:25:49.362534",{"slug":10465,"name":10465,"fn":10466,"description":10467,"org":10468,"tags":10469,"stars":10376,"repoUrl":10377,"updatedAt":10477},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10470,10473,10474],{"name":10471,"slug":10472,"type":15},"Code Review","code-review",{"name":10399,"slug":10400,"type":15},{"name":10475,"slug":10476,"type":15},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":10479,"name":10479,"fn":10480,"description":10481,"org":10482,"tags":10483,"stars":10376,"repoUrl":10377,"updatedAt":10486},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10484,10485],{"name":10448,"slug":10449,"type":15},{"name":10451,"slug":10452,"type":15},"2026-07-14T05:25:54.928983",{"slug":10488,"name":10488,"fn":10489,"description":10490,"org":10491,"tags":10492,"stars":10376,"repoUrl":10377,"updatedAt":10495},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10493,10494],{"name":13,"slug":14,"type":15},{"name":10386,"slug":10387,"type":15},"2026-07-30T05:29:03.275638",496,{"items":10498,"total":409},[10499,10517,10530,10543,10559,10571,10582],{"slug":10500,"name":10500,"fn":10501,"description":10502,"org":10503,"tags":10504,"stars":23,"repoUrl":24,"updatedAt":10516},"sop-build","orchestrate end-to-end SOP monitoring pipelines","Orchestrate the end-to-end SOP pipeline, including preflight prerequisite checks, verifying models and downloading assets, generating the DeepStream SOP microservice with RTSP output, evaluating the microservice, and building, deploying, and testing the VSS SOP blueprint. Use when asked to run the full SOP pipeline, set up the SOP pipeline from scratch, execute preflight checks, verify models, download assets, generate the SOP microservice, evaluate the microservice, build the VSS blueprint, deploy the VSS blueprint, test the VSS blueprint, or manage the complete build-evaluate-deploy-test cycle.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10505,10506,10509,10512,10513],{"name":13,"slug":14,"type":15},{"name":10507,"slug":10508,"type":15},"Engineering","engineering",{"name":10510,"slug":10511,"type":15},"Monitoring","monitoring",{"name":9,"slug":8,"type":15},{"name":10514,"slug":10515,"type":15},"Video","video","2026-07-14T05:32:48.503678",{"slug":10518,"name":10518,"fn":10519,"description":10520,"org":10521,"tags":10522,"stars":23,"repoUrl":24,"updatedAt":10529},"sop-by-action-eval","run by-action VLM evaluations","Use when running by-action VLM evaluation (per-action-clip inference + accuracy metrics) against the BP evaluation-ms HTTP API. Invoked as \u002Fsop-by-action-eval \u003Cinputs.yaml> [natural language parameter overrides]",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10523,10526,10527,10528],{"name":10524,"slug":10525,"type":15},"Evals","evals",{"name":17,"slug":18,"type":15},{"name":10510,"slug":10511,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:36:13.260585",{"slug":10531,"name":10531,"fn":10532,"description":10533,"org":10534,"tags":10535,"stars":23,"repoUrl":24,"updatedAt":10542},"sop-cr-finetuning","fine-tune VLM models for SOP monitoring","Fine-tune Cosmos-Reason2 (CR2) VLM for SOP monitoring. Use when you need to launch and monitor a VLM training run with a given dataset ID.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10536,10539,10540,10541],{"name":10537,"slug":10538,"type":15},"AI Infrastructure","ai-infrastructure",{"name":17,"slug":18,"type":15},{"name":10510,"slug":10511,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:36:22.874218",{"slug":10544,"name":10544,"fn":10545,"description":10546,"org":10547,"tags":10548,"stars":23,"repoUrl":24,"updatedAt":10558},"sop-data-augmentation","augment annotated datasets","Use when the user wants to run data augmentation on an annotated dataset, configure augmentation parameters, check augmentation status, or understand what each QA augmentation type does (BCQ, MCQ, GQA, DMCQ, DSQA, ENQA)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10549,10552,10555,10556,10557],{"name":10550,"slug":10551,"type":15},"Data Engineering","data-engineering",{"name":10553,"slug":10554,"type":15},"Datasets","datasets",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":10448,"slug":10449,"type":15},"2026-07-14T05:36:20.305657",{"slug":10560,"name":10560,"fn":10561,"description":10562,"org":10563,"tags":10564,"stars":23,"repoUrl":24,"updatedAt":10570},"sop-ddm-finetuning","fine-tune DDM-Net models for SOP monitoring","Fine-tune DDM-Net temporal boundary detector for SOP monitoring. Use when you need to launch and monitor a DDM-Net training run with a given dataset ID.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10565,10568,10569],{"name":10566,"slug":10567,"type":15},"Deep Learning","deep-learning",{"name":10510,"slug":10511,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:35:16.203684",{"slug":10572,"name":10572,"fn":10573,"description":10574,"org":10575,"tags":10576,"stars":23,"repoUrl":24,"updatedAt":10581},"sop-e2e-inference","run end-to-end inference evaluations","Use when running the e2e evaluation pipeline (temporal segmentation + action recognition + accuracy) against the BP evaluation-ms HTTP API. Invoked as \u002Fsop-e2e-inference \u003Cinputs.yaml> [natural language parameter overrides]",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10577,10578,10579,10580],{"name":10524,"slug":10525,"type":15},{"name":17,"slug":18,"type":15},{"name":10510,"slug":10511,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:36:15.23958",{"slug":4,"name":4,"fn":5,"description":6,"org":10583,"tags":10584,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10585,10586,10587,10588],{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":20,"slug":21,"type":15}]