Makes scientific training runs visible and recoverable via MLflow: scale-free loss histories, validation curves, early stopping, shared metrics/QC, and cohort health checks. Use when launching, resuming, monitoring, or reviewing training runs.
Ships in training-run-hygiene. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A completed run is not a healthy one. Every rule here exists to make "this model is not learning" visible while the run is still cheap to stop.
Use MLflow for new scientific training experiments and onboard currently running experiments from their saved outputs. Keep each experiment's canonical output directory authoritative: metrics, histories, checkpoints and QC stay there. Tracking is a derived index; a server outage must not lose local results or force an otherwise recoverable training job to fail.
Use one shared server rather than a server per manager. On CRI, read the maintained
setup and onboarding instructions in
/gpfs/data/karczmar-lab/hfdp/docs/sites/randi.md; reuse its server,
environment, exporter and backup owner. Those host-specific details are not
defaults for other clusters. Do not restart shared infrastructure to onboard a lane.
<lane>-<manager>, with stable lowercase names, such as
vanguard-hal. Each logical experiment is a run across scheduler allocations;
related experiments share a group. Record manager, lane, experiment_dir
and a nonempty plain-language config.description for every run. Publish the
description as its MLflow run note. Explain the scientific question, main knob,
current role and pending QC. Verify the saved note after publishing.experiment_dir and every planned task
artifact are mapped in the configured publisher registration to the common
metric keys. An ancestor, sibling or historical evaluation directory does not
cover a new output root. Enroll runs actually being launched; preserve existing
run identities. Verify the first saved measurements through the server when it
is available.train and eval labels, not a metric role named
selection. Explain in descriptions/tables when eval is used for checkpoint
selection and therefore is not an untouched test; preserve the underlying split.
Record trained versus evaluated checkpoint, pending/failed readouts, denominator
and selected versus latest checkpoint. Label missing scores pending, failed or
unavailable as appropriate; never substitute zero./eval
suffix; normalize incoming /val there so future runs cannot split the same
endpoint across two charts. Keep validation/test roles in run metadata and
preserve distinct endpoints and units, such as breast versus patient AUC.
Check the published metric keys after onboarding a run. Replace superseded
dashboard entries when migrating names; preserve authoritative run artifacts.dataset_mean/val and dataset_panther/val.
Only combine scores whose cohort, endpoint and measurement definitions match;
retain denominators and any genuine protocol differences in run descriptions.
When replacing an indexed layout, backfill the common metrics and remove its
superseded dashboard entries, preserving canonical experiment artifacts.step_metric: null. Publish progress and coverage as
structured MLflow artifacts and verify access through the dashboard.Before reporting a lane onboarded, verify real saved values and representative images in its project, a repeated unchanged export without duplicate records, refresh after new output, and automatic exporter startup. Report missing QC or network access explicitly. Tracking makes existing QC visible; it does not replace the validation, plotting, early-stopping and provenance requirements below.
Every experiment involving learning must run validation and automatically save a
training-and-validation curve in its canonical output directory. Use run-provenance's
one-directory contract: asynchronous readouts and QC belong under the same
experiment root as its checkpoints and logs.
Before launching a new learning experiment, require run-provenance's automatic
reproduction bundle in that root: a runnable README, the complete effective config,
Git revision/status/diffs, and environment and input identities. Preserve these
records across resumes; this does not require retrofitting historical experiments.
Declare the validation owner, fixed readout recipe, first evaluation and refresh cadence in the run config before launch. Plot training and validation as distinct labeled series in one figure, using separate panels when they measure different quantities. For self-supervised pretraining, show the training objective alongside regular downstream validation, at least a fixed linear evaluation; a falling SSL loss alone does not satisfy this requirement. Keep the probe settings fixed across checkpoints.
Write the curve automatically from the first recorded update, refresh it after training-history and completed validation updates at the configured cadence, and retain it when the experiment stops or resumes. Show optimizer updates and actual training examples seen or eligible-set coverage. If validation has not completed, label it pending and show the latest completed validation checkpoint; never imply that a training-only curve or stale readout is current validation. Before calling monitoring ready, inspect the saved figure after an actual update, including the single-point case. Singleton traces need a visible mark, and aggregation blocks must reveal early learning at the experiment's update cadence. Verify that both sources are bound to the intended experiment. Include the output-directory link in every update.
Use one canonical learning_curve.png per experiment, at its output root,
containing both training and validation panels. Training and asynchronous
validation feed one rendering owner, which refreshes this same file atomically.
Before validation completes, the figure shows training with validation explicitly
pending; completion fills in that figure rather than creating a second version.
Do not keep parallel training-only and training-plus-validation learning curves, separate evaluator curve directories, or copies named for readability revisions or checkpoint snapshots. Preserve numerical histories and checkpoint metrics so the canonical figure can be regenerated without saving redundant plot variants. Additional QC figures must answer a distinct question, rather than repeat panels already in the canonical curve. Link the canonical curve from the root README and experiment updates. Apply this convention to new work; do not rewrite frozen historical run artifacts or a live execution checkout to retrofit it.
Every new model-training pipeline must implement validation-based early stopping,
enabled by default for new runs. Record the monitored metric, optimization direction,
minimum improvement, patience, any warm-up, evaluation cadence and maximum training
budget in the effective config before launch. Express patience in completed eligible
validation evaluations. Follow decision-gates when adopting the numerical scientific
stopping rule; this implementation requirement does not choose its thresholds.
Persist the best metric, best checkpoint, patience counter and last consumed evaluation identity with recovery state so resuming does not reset patience or count an evaluation twice. Consume asynchronous results in checkpoint order; missing, pending or failed validation must not count as non-improvement. Coordinate a graceful stop across distributed ranks at a safe checkpoint boundary. Preserve the selected best checkpoint, record the stopping reason and triggering checkpoint, and drain required validation/QC after stopping.
An explicitly prescribed fixed-duration protocol, such as an exact reproduction, may disable early stopping with its reason recorded in the config. Keep the implementation available, and preserve already frozen live-run stopping policies.
Validation runs in a separate process from training, consuming immutable, atomically published checkpoints. The training loop publishes durable requests and continues; it does not run downstream fitting or evaluation inline. Separate processes may share an allocation when resources permit, but must not duplicate the scientific validation implementation or change its fixed settings.
Every validation worker is a backlog drainer, not a one-checkpoint job:
Before training starts, require the validation recipe, cadence, worker/dispatcher binding, output paths and curve settings in the effective config. Fail before expensive execution when these are absent. Validation and curves are mandatory for new experiments, including ablations; changing the method must not bypass this common path.
Apply research-code-parsimony before adding any QC: find the existing numerical
producer, plotting owner and actual callers. All experiments use the same shared
implementation for their applicable base QC: input/augmentation examples, combined
training/validation curves, training exposure, representation health and validation
freshness/backlog. Bind that base set in the complete experiment config; make an
inapplicable diagnostic explicit rather than silently omitting it.
Method-specific diagnostics extend this path with thin adapters. Reuse metric definitions, layout/style helpers and rendering functions; do not copy a renderer per architecture, trainer, worker or campaign, or recompute metrics independently for a plot. Training, asynchronous validation and QC workers consume the same recorded measurements and plotting owners. Keep common readout settings fixed across checkpoints and ablations.
All example/image QC uses grids of one complete batch: inputs, augmentations, outputs, reconstructions, scores, attention maps and native-detail crops. Include every batch member and every applicable consumed view and context/reference role, with clear labels. Use the data loader's grouping and configured batch size; identify a fixed QC batch explicitly. Save the grids in the experiment output directory and tracker. Remove superseded single-input panels from active registration and derived tracker copies; preserve originals required by immutable receipts. Do not publish individual-image drilldowns. Reuse the shared grid renderer across experiments. Numerical learning curves remain separate figures.
Save applicable qualitative QC at initialization and the configured cadence, alongside numerical checks that can reveal failure even when examples look plausible. Use a fixed, appropriately split QC roster and record selection rules, source identities, scores and spatial coordinates where applicable. Diagnostic grouping must preserve complete batch membership. Keep different learned representations explicitly identified and use their actual outputs for selection. Save coverage, concentration, diversity and other applicable health measurements beside the grids, using shared renderers with thin adapters.
When replacing duplicated QC, update current callers and remove the superseded implementation in the same scoped change. Preserve immutable historical artifacts and live execution pins. Shared instructions alone do not establish that existing runtime paths have been consolidated; check callers before claiming coverage.
The canonical learning curve contains the optimization loss and the same task metric on training and validation data. For segmentation, show training and validation Dice beside the loss; patch objectives alone are not segmentation validation. Use the same deterministic inference recipe, aggregation and fixed eligible membership for both metric series. Training-set evaluation is descriptive fit, not evidence of generalization. Label validation used for selection honestly.
One renderer refreshes one stable learning_curve.png atomically from recorded
measurements throughout training and after asynchronous evaluations finish. Use
separate axes for loss and task performance, label train/validation distinctly,
and show pending evaluations explicitly. Do not write a plot per epoch or keep
parallel loss-only snapshots. Preserve numerical histories for reproducibility.
A figure inspection must confirm that task performance is actually present on
both splits before calling training monitoring complete.
Every scientific training run must persist an append-only, machine-readable training history from the first optimizer update through every resume. Record at minimum:
Every loss component must also carry, in the same row, the mean square of its
own target over its own element set, and the resulting scale-free ratio, where
1.0 is what predicting zero scores. A loss in physical units may never be
reported as evidence that a model fits, because a small absolute error and a small
target are indistinguishable without the denominator: a run whose loss read
0.0048 in physical units squared, against a target mean square of 0.0061, had
learned almost nothing and looked healthy for a month.
Render human-readable curves at a predeclared cadence throughout training, not only at completion, and render them so a failure to learn is visible: plot the scale-free ratio with its no-skill reference line and a smoothed trend. One point per update with one source per point is dominated by source-to-source target scale and hides a trend of tens of percent.
Resume must append without gaps or duplicated steps. The launcher must fail before heavy training when the history schema, output path, or plotting cadence is absent.
If a frozen live run lacks a true loss history, add only a versioned checkpoint sidecar and label its metrics as checkpoint QC rather than optimizer-loss curves. Never reconstruct or imply losses that were never recorded.
Follow experiment-design's full-dataset default. Reuse existing mechanical
evidence. For an unverified training path, use only a brief real-input check of
forward/backward execution, finite gradients, geometry, memory, checkpoint writing
and required diagnostics. Combine checks where possible; repeat only for a named
repair or unverified path. Do not require small-subset memorization, a favorable
score, a sweep or a plateau before full-cohort training.
Monitor learning against matched no-skill and non-learned references during the full eligible training run. Small-run losses or images establish no scientific benefit, method ranking, generalization or lack of potential. Mechanical failures justify repair; scientific comparisons use the full eligible cohort with preserved splits. Numerical promotion thresholds still require explicit approval.
Every scientific training run must also have predeclared, outcome-blind longitudinal QC from initialization through training, with numerical diagnostics on the full eligible roster. A fixed selection spanning major source strata may provide visual illustrations alongside those diagnostics. Run QC at the declared checkpoint cadence, preserve physical aspect ratio and the full input extent, and include task-appropriate fidelity and failure-mode diagnostics.
Any model that emits a latent or parameter field must record that field's distribution at the same cadence: per field a median, a low and a high percentile, and bound occupancy, computed in the parameterization's own space — log for a log-parameterized coordinate. Field collapse is the characteristic failure of a latent representation and reconstruction error does not reveal it, because a field pinned near one value still produces a plausible output. Report a field whose spread falls below a predeclared factor as a failure rather than leaving it to a later probe.
The launcher must bind the QC owner, roster, cadence, and output root before submission.
Default heavy training QC to an asynchronous scheduled worker on a separate accelerator, consuming immutable, atomically published checkpoints while training continues.
What SKILL.md sets; muted values are Claude Code's defaults
/training-run-hygiene:training-run-hygienefrom training-run-hygiene
npx claudepluginhub uchicago-dsi/ai-sci-skills --plugin training-run-hygieneOther plugins' skills for the same job