Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

run-experiment

БесплатноБез исполняемых скриптовНе проверен

Execute the complete experimental workflow - model optimization followed by evaluation - for all runs in a scaffolded experiment. Use after…

niznik-devот niznik-dev★ 15 звёзд на GitHub13 установок в других каталогах

Об этом скилле

Your Task

Orchestrate experiment execution by reading tool specifications from experiment_summary.yaml and calling the appropriate tool modules sequentially:

  1. Read experiment_summary.yaml to identify tools being used
  2. Execute model optimization (fine-tuning) for all runs
  3. Wait for optimization to complete (REQUIRED)
  4. 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 ENV table to the user, ask whether to pip install -e . first or continue anyway.

Workflow

High-Level Steps

  1. Locate experiment - Find experiment directory (current dir or ask user)
  2. Verify scaffolding - Ensure configs exist for optimization and evaluation
  3. Read tool specifications - Parse experiment_summary.yaml "tools" section
  4. Execute optimization - Call optimizer module (torchtune)
  5. Execute evaluation - Call evaluator module (inspect) - MUST wait for optimization
  6. Create orchestration log - Document process in logs/run-experiment.log
  7. 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> (writes logs/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> (writes logs/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:

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:

  1. Run python -m cruijff_kit.tools.run.submit_torchtune <experiment_dir> — submits, drip-feeds, monitors, writes logs/run-torchtune.log + logs/run-torchtune.state.json. Blocks until all jobs reach terminal state.
  2. Only after step 1 returns successfully, run python -m cruijff_kit.tools.run.submit_inspect <experiment_dir> — same pattern for evaluations, writes logs/run-inspect.log + logs/run-inspect.state.json. Blocks until terminal.
  3. 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
Полный SKILL.md на GitHub

Установить run-experiment в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evaluators/README.mdevaluators/inspect/cache_prebuilding.mdevaluators/inspect/dependency_checking.mdevaluators/inspect/evaluation_selection.mdevaluators/inspect/job_submission.mdevaluators/inspect/main.mdevaluators/inspect/monitoring.mdevaluators/inspect/parsing.mdevaluators/inspect/validation.mdlogging.mdoptimizers/README.mdoptimizers/torchtune/job_submission.mdoptimizers/torchtune/main.mdoptimizers/torchtune/monitoring.mdoptimizers/torchtune/parsing.mdoptimizers/torchtune/run_selection.mdoptimizers/torchtune/validation.mdshared/compute_monitoring.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить run-experiment с