The thing that saves you from a 5-hour crash
For long-running training, you need to save snapshots so you can resume after preemption, crashes, or notebook disconnects. tf.train.Checkpoint with CheckpointManager is the right tool — unlike save_weights, it can save arbitrary Python objects including optimizer state, custom step counters, and even datasets.
CheckpointManager(max_to_keep=N) automatically deletes old checkpoints when the limit is hit. This keeps disk usage bounded during long training runs.
The pattern: build the checkpoint object, attach to a manager, restore at the start of training (no-op if no checkpoint exists), save periodically. A 6-hour training run that crashes at hour 5 should cost you 0–10 minutes of progress, not 5 hours.