ml-experiment-loop
БесплатноЗапускает вложенные скриптыНе проверенAutonomous fixed-budget ML experiment loop — setup, iterative hypothesis testing, git-based keep/discard tracking, and indefinite autonomous execution…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
ML Experiment Loop
When to Use
- Running autonomous ML research on a training codebase
- Iterating on neural network architecture and hyperparameter choices overnight
- Any scenario where you want to maximize experiments within a fixed compute budget without human intervention
Phase 1: Setup (One-Time, Before the Loop)
Complete this phase once before starting the experiment loop.
Step 1.1 — Agree on Run Tag
Propose a run tag based on today's date (e.g., mar14). The branch autoresearch/<tag> must NOT already exist — this is a fresh run.
git branch --list "autoresearch/*"
Step 1.2 — Create the Branch
git checkout -b autoresearch/<tag>
Step 1.3 — Read In-Scope Files
Read these three files for full context before touching anything:
README.md— repository context and goalsprepare.py— fixed constants, data prep, tokenizer, dataloader, evaluation. DO NOT MODIFY.train.py— the only file you modify. Architecture, optimizer, hyperparameters, training loop.
Step 1.4 — Verify Data Exists
ls ~/.cache/autoresearch/
If the cache directory does not exist or is empty, stop and tell the human to run uv run prepare.py first.
Step 1.5 — Environment Sanity
uv sync
Step 1.6 — Initialize results.tsv
Create results.tsv with just the header row. This file stays untracked by git throughout the run.
echo -e "commit\tval_bpb\tmemory_gb\tstatus\tdescription" > results.tsv
Step 1.7 — Establish Baseline
Your very first run MUST be the unmodified baseline. Do not edit train.py yet. Run the experiment as-is (see Phase 2) to establish the baseline metric. Record it in results.tsv.
Phase 2: The Experiment Loop (LOOP FOREVER)
This loop runs indefinitely until the human manually interrupts it. NEVER ask the human if you should continue. NEVER stop for any reason other than: the human interrupts, or a run crashes beyond repair after multiple fix attempts.
WHILE TRUE:
1. Look at git state (current branch/commit)
2. Formulate an experimental hypothesis
3. Edit train.py
4. git commit
5. Run the experiment (redirect ALL output to file)
6. Extract the metric via grep
7. Evaluate: crash? improve? equal? worse?
8. Log to results.tsv
9. Keep (advance branch) or discard (git reset)
10. Repeat from step 2
Step 2.1 — Check Git State
git log --oneline -5
git status
Step 2.2 — Formulate a Hypothesis
Pick ONE focused idea to test. Examples:
- "Increase learning rate from 0.01 to 0.03"
- "Add gradient clipping at norm 1.0"
- "Switch from ReLU to SiLU activation"
- "Reduce depth from 8 to 6 and widen embedding to compensate"
- "Remove value embeddings to simplify the attention"
If you have run out of obvious ideas:
- Re-read
train.pyfrom scratch for angles you missed - Re-read
prepare.pyfor constraints you may not have noticed - Try combining two near-miss experiments from
results.tsv - Try a more radical architectural change
- Try removing complexity — simpler can be better
You will not ask the human for ideas. You generate ideas yourself.
Step 2.3 — Edit train.py
Apply only the changes needed for this single hypothesis. Keep the diff minimal and reviewable.
Constraints (from prepare.py — cannot change):
- Training time budget: 5 minutes wall clock (excluding startup/compilation)
- Sequence length, evaluation protocol, tokenizer
evaluate_bpbfunction — this is the ground truth metric
What you CAN change in train.py:
- Model architecture (depth, width, attention pattern, activations)
- Optimizer (type, learning rate, scheduler, momentum)
- Training loop (batch size, accumulation, warmup)
- Anything else in
train.py
VRAM constraint: Large VRAM increases are acceptable only for meaningful metric gains.
Step 2.4 — Git Commit
git add train.py
git commit -m "experiment: <one-line description of what you changed>"
Step 2.5 — Run the Experiment (CONTEXT-SAFE)
Redirect A
Установить ml-experiment-loop в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGrepGlobВложенные файлы
FAQ
Что делает скилл ml-experiment-loop?
Autonomous fixed-budget ML experiment loop — setup, iterative hypothesis testing, git-based keep/discard tracking, and indefinite autonomous execution. Implements the karpathy/autoresearch protocol.
Как установить скилл ml-experiment-loop?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ml-experiment-loop запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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