lesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibilitylesson 4 of 5 · checkpoints and reproducibility
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.
Build the full checkpoint bundle. descend(w, v, start_step, steps, lr=0.1, m=0.9) runs momentum descent on w² and returns the complete state dict {"w", "v", "step", "config": {"lr", "m"}}. Run 8 steps straight through; then run 4, checkpoint, and resume 4 more FROM the bundle. Print both end states (f"full: step={...} w={...:.6f}" / f"resumed: step={...} w={...:.6f}") and "identical:" comparing the entire dicts.