Practical overview
When it fits
Use it when building model experiments around PyTorch Lightning and Hydra, especially when you want a reusable project layout and configurable training runs rather than a blank repository.
Who it is for
- Python developers starting or structuring PyTorch Lightning experiments.
- Researchers and practitioners who want configurable training runs and reusable experiment settings.
- Learners seeking a commented example project for Lightning and Hydra.
Documented uses
- Start a new Lightning experiment from an existing project structure.
- Keep training, model, data, logger and experiment settings in Hydra configurations.
- Override experiment parameters from the command line or define multiple runs.
- Use the included MNIST example as a reference for model and data-module code.
Requirements & limits
- The README specifies Python 3.8–3.10, PyTorch 2.0+, Lightning 2.0+ and Hydra 1.3.
- It documents CPU and accelerator training configurations, but flags current problems with DDP mode.
- Hydra multirun cannot currently be resumed according to the README.
- The template is not designed around data pipelines whose stages depend on one another.
- The repository describes itself as an unofficial community project.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up the template repository
Create a local copy of the project and install its Python requirements.
Before you start
- Python 3.8, 3.9 or 3.10
- Git and a terminal
- PyTorch installed according to its installation instructions
Steps
Clone https://github.com/ashleve/lightning-hydra-template and change into the lightning-hydra-template directory.
Optionally create and activate a Conda environment; the README example uses Python 3.9.
Install PyTorch according to the PyTorch installation instructions.
Install the repository requirements with pip install -r requirements.txt.
Expected outcome
A local template project with its requirements installed, ready for the documented example training workflow.
Guide limitations
- The README’s sample training command is python src/train.py and describes an MNIST example; it does not guarantee successful execution in a particular environment.
- The README notes that dependencies and integrations can change and sometimes break.
Configure and launch a project experiment
Follow the template’s documented workflow for defining and starting a Lightning training experiment.
Before you start
- A local copy of the template with its requirements installed
- A PyTorch Lightning model and data module
- An experiment configuration that identifies the model and data module
Steps
Write a PyTorch Lightning module, using the MNIST module as the repository example.
Write a PyTorch Lightning data module, using the MNIST data module as the example.
Create an experiment configuration with paths to the model and data module.
Start training with python src/train.py experiment=experiment_name.yaml, substituting the name of the chosen configuration.
Expected outcome
The training entry point is invoked with the selected experiment configuration.
Guide limitations
- The README presents this as a basic workflow; project-specific models, data and configuration still need to be supplied.
- It identifies the configuration setup as suited to simple Lightning training rather than data pipelines with interdependent stages.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- ashleve/lightning-hydra-template · Official homepage title · retained in its source language

