What problem does it solve?
PyTorch training loops often become cluttered and error-prone when you need to handle devices, logging, checkpointing, and distributed execution; this Skill streamlines those concerns so you can focus on model logic.
Core Features & Use Cases
- High-level training orchestration: Use Lightning’s Trainer to standardize training, validation, checkpointing, logging, and precision handling while keeping your LightningModule focused on model behavior.
- Scalable distributed training: Switch between single-device and multi-device execution with strategies like DDP, FSDP, and DeepSpeed while keeping the training code largely unchanged.
- Extensible callbacks system: Add behavior like early stopping, model checkpointing, learning-rate monitoring, progress bar customization, and custom hooks without rewriting core training logic.
- Use case: Train an image classification model on your laptop first, then move to multi-GPU distributed training (and optionally larger sharded strategies) for a faster experiment cycle.
Quick Start
Install the library with pip install lightning, then create a LightningModule and run training with the Trainer by calling trainer.fit(model, train_loader).