run-experiment
БесплатноБез исполняемых скриптовНе проверенExecute the complete experimental workflow - model optimization followed by evaluation - for all runs in a scaffolded experiment. Use after…
Об этом скилле
Your Task
Orchestrate experiment execution by reading tool specifications from experiment_summary.yaml and calling the appropriate tool modules sequentially:
- Read experiment_summary.yaml to identify tools being used
- Execute model optimization (fine-tuning) for all runs
- Wait for optimization to complete (REQUIRED)
- Execute model evaluation for all runs
This ensures the entire experiment runs from training through evaluation with proper dependency management.
Prerequisites
- experiment_summary.yaml exists (from design-experiment skill)
- Scaffolding complete (from scaffold-experiment skill)
- SLURM cluster access
Dependency version check
Run before proceeding to catch stale envs (user pulled new pins but didn't re-run pip install -e .):
python scripts/check_env.py
- Exit 0: proceed.
- Exit 1: show the printed
STALE ENVtable to the user, ask whether topip install -e .first or continue anyway.
Workflow
High-Level Steps
- Locate experiment - Find experiment directory (current dir or ask user)
- Verify scaffolding - Ensure configs exist for optimization and evaluation
- Read tool specifications - Parse experiment_summary.yaml "tools" section
- Execute optimization - Call optimizer module (torchtune)
- Execute evaluation - Call evaluator module (inspect) - MUST wait for optimization
- Create orchestration log - Document process in
logs/run-experiment.log - Report combined summary - Show complete status
Tool Modules
This skill invokes callable Python submitters that handle SLURM submission, drip-feed under the gpu-test QoS cap, monitoring to terminal state, and canonical log emission as a side-effect. The Python is the source of truth; the prose modules under optimizers/ and evaluators/ describe the schemas and flow for downstream readers.
Optimizer modules: See optimizers/ for the schema description.
- torchtune (fine-tuning) →
python -m cruijff_kit.tools.run.submit_torchtune <experiment_dir>(writeslogs/run-torchtune.log+logs/run-torchtune.state.json)
Evaluator modules: See evaluators/ for the schema description.
- inspect-ai →
python -m cruijff_kit.tools.run.submit_inspect <experiment_dir>(writeslogs/run-inspect.log+logs/run-inspect.state.json)
Both submitters are resume-safe: re-invoking after an interruption reads the JSON state file and skips already-submitted entries. Both emit canonical SUBMIT_JOB: / SUBMIT_EVAL: lines that explore-experiment's compute-utilization step harvests. Future tools (DSPy, custom trainers, custom evaluators) plug in here as additional submitters.
Reading Tool Specifications
Parse experiment_summary.yaml "tools" section to identify frameworks:
Expected format:
tools:
preparation: "torchtune"
evaluation: "inspect-ai"
Tool to module mapping:
torchtune→ optimizers/torchtune/inspect-ai→ evaluators/inspect/
If tools section missing: Error out and ask the user to add a tools section to experiment_summary.yaml — don't silently assume defaults.
Sequential Execution
CRITICAL: Evaluation MUST wait for optimization to complete.
Why? Evaluation jobs need optimized model checkpoints.
Implementation:
- Run
python -m cruijff_kit.tools.run.submit_torchtune <experiment_dir>— submits, drip-feeds, monitors, writeslogs/run-torchtune.log+logs/run-torchtune.state.json. Blocks until all jobs reach terminal state. - Only after step 1 returns successfully, run
python -m cruijff_kit.tools.run.submit_inspect <experiment_dir>— same pattern for evaluations, writeslogs/run-inspect.log+logs/run-inspect.state.json. Blocks until terminal. - Append a high-level summary to
logs/run-experiment.log(the orchestration log). The detailed per-job records already live in the per-tool logs.
Long-Running / Detachable Monitoring
The default flow above blocks until all jobs finish. For experiments that may run for hours, the submitters support detach so a watcher can stop without killing the jobs. Three trigger paths converge on a clean exit (flush state → emit canonical MONITOR_DETACHED block → return; jobs keep running):
| Mechanism | Who uses it |
|---|---|
touch <experiment_dir>/logs/.detach |
Anyone — humans, agents, /loop, cron. Sentinel is sticky: remove it before re-attaching. |
SIGINT (Ctrl+C) |
A human at the terminal where the submitter is running |
SIGTERM |
A parent process killing the submitter subprocess |
After a clean detach, re-attaching is one of:
# One-shot snapshot (read-only; refreshes state from squeue/sacct):
python -m cruijff_kit.tools.run.status <experiment_dir>
# Continuous re-monitor without resubmitting:
python -m cruijff_kit.tools.run.submit_torchtune <experiment_dir> --resume-monitor
python -m cruijff_kit.tools.run.submit_inspect <e
Установить run-experiment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл run-experiment?
Execute the complete experimental workflow - model optimization followed by evaluation - for all runs in a scaffolded experiment. Use after scaffold-experiment to submit jobs to SLURM.
Как установить скилл run-experiment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл run-experiment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic