alterlab-pytorch-lightning

Installation
SKILL.md

PyTorch Lightning

Overview

PyTorch Lightning is a deep learning framework that organizes PyTorch code to eliminate boilerplate while maintaining full flexibility. Automate training workflows, multi-device orchestration, and implement best practices for neural network training and scaling across multiple GPUs/TPUs.

uv run --python ">=3.12" --with "lightning>=2.5" python train.py   # no install step; `import lightning as L` and `lightning.pytorch.*`
# torch already importable (`python -c "import torch, lightning"`)? run with plain `python`. CPU-only machine: add --index https://download.pytorch.org/whl/cpu (no CUDA wheels)

All code in this skill uses the unified lightning package. The separately published pytorch-lightning package installs the older pytorch_lightning namespace instead; do not mix the two namespaces in one project, because their classes are distinct (e.g. lightning.Trainer.fit rejects a pytorch_lightning.LightningModule with a TypeError).

When to Use This Skill

Installs
67
GitHub Stars
86
First Seen
Apr 12, 2026