select-and-verify-best-checkpoint
Skill7 starsChanged 10 months agoMITView on GitHub
Proves that evaluation ran at the intended cadence, the tracked metric selected the true best checkpoint, and held-out inference loaded that checkpoint. Use with Hugging Face Trainer or compatible training-state artifacts before trusting test metrics.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- apple-cktool-jsSkill
- apple-cktoolSkill
- audit-training-experimentSkill
- awkSkill
- close-out-ml-experimentSkill
- compare-models-blindlySkill
- conventional-commitsSkill
- design-resumable-model-evaluationSkill
- gogopowermanagerSkill
- ios-design-reviewSkill
- mikrotik-routerosSkill
- obsidian-dailySkill
- orbstack-cliSkill
- package-private-ml-artifactsSkill
- prepare-training-corpusSkill
- proxmox-adminSkill
- review-ios-ui-apple-higSkill
- review-training-data-qualitySkill
- run-hugging-face-training-smokeSkill
- sedSkill
- send-to-minionSkill
- swift-reviewSkill
- technical-writerSkill
- tmuxinatorSkill
- topydoSkill
- unhobble-agent-contextSkill
- validate-structured-model-outputSkill
- write-a-promptSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat checkpoint identity as an evidence requirement, not a configuration assumption.
- Very specific: line 35
Use --greater-is-better for maximized metrics and repeat --required-file to require adapter or model files inside the best checkpoint.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Select and Verify Best Checkpoint
Treat checkpoint identity as an evidence requirement, not a configuration assumption.
Configure selection explicitly
Set evaluation and saving to compatible cadences. Specify the metric, whether greater is better, and best-model loading. Ensure the configured metric name matches the emitted evaluation key; account for frameworks that add an eval_ prefix.
Verify trainer state
After training, run:
python scripts/verify_checkpoint.py output/trainer_state.json \
--metric eval_loss \
--expected-eval-steps 50,100,150 \
--evaluation-manifest held-out-run.json \
--loaded-checkpoint-field loadedCheckpoint \
--output checkpoint-proof.jsonThe script fails unless:
- the expected evaluation steps are present;
best_metricandbest_model_checkpointare non-null;- the recorded metric equals the optimum in evaluation history;
- the best checkpoint step matches the optimum step;
- the held-out manifest identifies that exact checkpoint.
Use --greater-is-better for maximized metrics and repeat --required-file to require adapter or model files inside the best checkpoint.
Preserve proof
Record the trainer state hash, checkpoint path and hash inventory, best metric and step, evaluation manifest, and evaluation command. If ties exist, report the framework's selected tied checkpoint rather than pretending the optimum is unique. Never claim held-out results came from the best checkpoint without an explicit load identity.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

