archive-experiment
БесплатноБез исполняемых скриптовНе проверенArchive a completed experiment, preserving all experiment files while deleting bulk checkpoint artifacts. Use after summarize-experiment or explore-experiment…
от niznik-dev★ 15 звёзд на GitHubОб этом скилле
Archive Experiment
Archive a completed experiment by copying the entire experiment directory and deleting only the large checkpoint directories (*/artifacts/).
Your Task
Archive an experiment by:
- Locating the experiment and validating completeness
- Running a dry-run inventory showing what will be kept vs deleted
- Resolving findings.md (prompting user if needed)
- Getting user confirmation
- Executing the archive (copy → verify → delete)
- Logging the process
Prerequisites
- experiment_summary.yaml exists in the experiment directory
- Experiment is complete (all runs evaluated) — or user explicitly uses
--force - Conda environment activated — the script requires PyYAML
Workflow
1. Locate Experiment
Find the experiment directory:
- If user provided a path: use it
- If in an experiment directory (contains experiment_summary.yaml): use current directory
- Otherwise: ask user for the path
Read experiment_summary.yaml to determine:
experiment.name— the experiment nameexperiment.dir— where model checkpoints liveruns— list of run namesevaluation.matrix— expected evaluations
2. Dry Run Preview
Run the archive script in dry-run mode:
python src/tools/experiment/archive_experiment.py <experiment_dir> --dry-run --pretty
If the default archive location is wrong, the user can specify --archive-base <path>.
Default archive location: ck-archive/{project}/{experiment_name}/ as sibling of the experiment's grandparent directory. For an experiment at __SCRATCH__/ck-projects/{project}/my_experiment/, the archive lands at __SCRATCH__/ck-archive/{project}/my_experiment/. The project layer is required — experiment.project must be set in experiment_summary.yaml.
Show the user:
- Number of files and total size to archive (entire experiment directory)
- Number of checkpoint directories and total size to delete
- Archive destination path
- Any incomplete runs (if
--forcewould be needed)
3. Resolve findings.md
Check the dry-run output for findings_source:
- If a source was found — tell the user which file will be copied as
findings.md - If no source was found (
findings_source: null) — ask the user:- "Would you like to write a brief findings.md before archiving? This captures what you learned from the experiment."
- If yes: create
{experiment_dir}/findings.mdwith user's content, then re-run dry-run - If no: proceed without findings.md
4. Confirm with User
Present the plan clearly:
Archive plan for: {experiment_name}
Archive: {N} files ({X} MB) → {archive_dir}
Delete: {M} checkpoint dirs ({Y} MB)
Proceed? (y/n)
Use AskUserQuestion to get explicit confirmation before proceeding.
5. Execute Archive
Run the archive script without dry-run:
python src/tools/experiment/archive_experiment.py <experiment_dir> [--force] [--archive-base <path>] --pretty
The script will:
- Copy the entire experiment directory to the archive
- Verify the archive (file existence + size check)
- Delete originals: checkpoint directories (
*/artifacts/) and experiment directory - Report results
6. Report Results
Show the user:
- Archive location
- Files preserved
- Storage freed
- Any warnings (incomplete runs, copy errors)
7. Create Log
Write archive-experiment.log to the archive directory:
{archive_dir}/archive.log
See logging.md for action types and format.
What Gets Kept
The entire experiment directory is copied to the archive, preserving its original structure. This includes configs, SLURM scripts, eval logs, exploration, logs, and any other files. Since these are all small (KB-scale), there's no reason to selectively delete them.
What Gets Deleted
| Artifact | Why Safe |
|---|---|
Model checkpoints (*/artifacts/) |
Reproducible via fine-tuning; these are the only large artifacts |
Error Handling
Incomplete experiment (no --force)
- Show which runs are missing eval logs
- Refuse to archive
- Suggest: complete the runs, or use
--forceif results aren't needed
Archive directory already exists
- Refuse to overwrite
- Suggest: remove the existing archive first, or choose a different
--archive-base
Verification failure
- Do NOT delete originals
- Report which files are missing or mismatched
- The archive directory may be in a partial state — user should investigate
experiment_summary.yaml missing or invalid
- Refuse to proceed
- This is the one file we absolutely need
Output Files
The archive mirrors the original experiment directory structure, nested under the project name:
{archive_base}/{project}/{experiment_name}/
├── experiment_summary.yaml
├── findings.md
├── summary.md
├── {dataset}.json
├── logs/
│ ├── design-experiment.log
│ ├── scaffold-torchtune.log
│ └── ...
├── {run_name}/
│ ├── finetune.yaml
│ ├── finetune.slurm
│ ├── setup_finetune.yaml
│ └── e
Установить archive-experiment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл archive-experiment?
Archive a completed experiment, preserving all experiment files while deleting bulk checkpoint artifacts. Use after summarize-experiment or explore-experiment when an experiment is complete and results have been reviewed.
Как установить скилл archive-experiment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл archive-experiment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub