Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

feat(tools): gc_dead_runs — GC early-crashed runs' checkpoints#961

Open
ocg-goodfire wants to merge 1 commit into
feature/jaxfrom
feature/gc-dead-runs
Open

feat(tools): gc_dead_runs — GC early-crashed runs' checkpoints#961
ocg-goodfire wants to merge 1 commit into
feature/jaxfrom
feature/gc-dead-runs

Conversation

@ocg-goodfire

Copy link
Copy Markdown
Collaborator

What

param_decomp/tools/gc_dead_runs.py: finds and (with --delete) removes early-crashed runs under $PARAM_DECOMP_OUT_DIR/{runs,jax_runs} — the dead runs whose leftover orbax checkpoints are the dominant storage waste (checkpoint retention on live runs already works; the waste is crashed runs nobody cleaned up).

A run is deletable iff ALL of:

  • the invoking user owns it (st_uid check — never touches teammates' runs)
  • it has checkpoints (numeric ckpts/<step> entries) — that's where the bytes are
  • its max checkpoint step is below --max-step (default 5000): crashed early, so the ckpts are useless for analysis or resumption
  • no live SLURM job references it in a stdout log under slurm_logs/ (a healthy run passes through low steps early — this guard is what makes "early" watertight)
  • its top-two-levels mtime is quiet for --quiet-minutes (default 60; race guard between submission and first stdout)

Dry-run by default, prints a sized candidate list.

Usage

python -m param_decomp.tools.gc_dead_runs            # dry-run
python -m param_decomp.tools.gc_dead_runs --delete

Track record

  • 2026-07-03: 44 runs, 19.28 TiB freed
  • 2026-07-07: 3 runs, 4.02 TiB freed (/mnt/data 95% → 93%)

Known sharp edge (from lore 2026-07-03--task--solve-resumption-oom): it GC'd p-05101e15, a crashed run that was deliberately kept as a resume-OOM diagnostic artifact. Runs referenced only by lore/investigations (not by live jobs) are not protected — possible follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G7BRWT94QzDbqV43BtTFUE

Finds runs under $PARAM_DECOMP_OUT_DIR/{runs,jax_runs} that are safely
deletable: owned by the invoking user, have checkpoints, max ckpt step
below --max-step (crashed early, ckpts useless for analysis or resume),
not referenced by any live SLURM job's stdout under slurm_logs/, and
quiet for --quiet-minutes. Dry-run by default; --delete removes.

First runs reclaimed 19.28 TiB (44 runs, 2026-07-03) and 4.02 TiB
(3 runs, 2026-07-07).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7BRWT94QzDbqV43BtTFUE
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant