Lesson 14 / Unit 4: Training Experiments
Checkpoint Selection
Choose the model using a declared validation metric and keep evaluation evidence separate from selection.
The retained checkpoint is epoch 23. The run continued to epoch 60, but the selection rule kept the earliest checkpoint with the lowest observed validation digit error rate. Continuing to train did not automatically earn a replacement.
Selection Rule
if validation_digit_error_rate < best: best = validation_digit_error_rate torch.save(model.state_dict(), 'best.pt')The strict comparison retains the earlier checkpoint on a tie. A different rule is valid if declared before inspecting the results: for example, a minimum exact-match requirement followed by lower latency. Do not quietly switch metrics after seeing which one makes a run look better.
Evaluation Result
| Measure | Recorded value |
|---|---|
| Selected epoch | 23 |
| Digit edits | 69 / 256 |
| Digit error rate | 27.0% |
| Exact sequences | 62 / 120 |
| Train + validation time | 52.25 s |
These are development results from the speaker split described earlier. The evaluation speaker was already inspected after the pilot, so it is not a fresh blind test. The checkpoint was selected with validation error, but that does not undo the wider development history.
Save Provenance
Retain model weights, vocabulary, feature recipe, dataset revision, split manifest, package versions and checkpoint checksum. A weight file without its input contract is not a reproducible recognizer.
import hashlibwith open('my-run/best.pt', 'rb') as f: print(hashlib.sha256(f.read()).hexdigest())Compare this with the corresponding field in results.json, not with another machine’s training output. Seeds help reproduce a run but do not promise identical results across every platform.
Error Inspection makes the aggregate result tangible. The evaluation harness packages the evidence for comparison with another run.
We do this work for teams shipping voice agents: Self-Hosted Voice Agent .
Edit this lesson on GitHub ↗Discussion
Questions, corrections and war stories welcome. Sign in with GitHub to comment.