Callbacks are the training control plane
fit() runs the loop, but callbacks are what make a run smart. They're hooks Keras fires at fixed points — start and end of each epoch, each batch, the whole run — and from inside those hooks a callback can read your metrics and act: stop early, save a checkpoint, drop the learning rate, write a log. Without them, a training run is a fire-and-forget script that wastes GPU hours overfitting and hands you nothing to recover the best model from.
The four that turn a script into a pipeline
The Code section wires the core set. EarlyStopping watches val_loss and halts when it stops improving for patience epochs — and crucially, restore_best_weights=True rolls the model back to its best point instead of leaving you with the slightly-overfit final state. ModelCheckpoint with save_best_only=True keeps the best weights on disk as you go, so a crash never costs you the run. ReduceLROnPlateau cuts the learning rate when progress stalls, squeezing extra accuracy out of a plateau. The fourth slot is a logger — CSVLogger here, or swap in TensorBoard for live curves.
The order in the list doesn't matter for these four; they read state independently. When the built-ins don't cover your case, write a custom callback by subclassing keras.callbacks.Callback and overriding the hook you need — on_epoch_begin, on_batch_end, on_train_end, and the rest all receive a logs dict of the current metrics.