What problem does it solve?
This Skill reduces the friction of writing and maintaining training code by structuring PyTorch projects into a standardized Lightning workflow, so you can focus on the model and experiments instead of boilerplate loops.
Core Features & Use Cases
- LightningModule organization: Encapsulate model logic into
LightningModule with clear hooks like training_step, validation_step, test_step, predict_step, and configure_optimizers.
- Trainer-driven scalability: Use the
Trainer to automate device placement, gradient handling, checkpointing, early stopping, mixed precision, and distributed strategies (DDP/FSDP/DeepSpeed).
- LightningDataModule for reproducible data pipelines: Centralize data preparation and dataloader construction using
prepare_data, setup, train_dataloader, val_dataloader, test_dataloader, and predict_dataloader.
Quick Start
Use the pytorch-lightning skill to structure your model as a LightningModule, your data as a LightningDataModule, then train it with L.Trainer(...).fit(model, datamodule=dm).