Home
Cookiecutter-Pytorch-Lightning
This modern Cookiecutter template provides all the necessary tools for deep learning development, training, testing, and deployment. It supports the following features:
- PyTorch and PyTorch Lightning for deep learning framework
- Hydra for modular experiment configuration
- Optional experiment trackers: Tensorboard, W&B, Neptune, Comet, MLFlow and CSVLogger
- uv for dependency management
- Supports both src and flat layout.
- CI/CD with GitHub Actions
- Pre-commit hooks with pre-commit
- Code quality with ruff, mypy and deptry.
- Publishing to PyPI by creating a new release on GitHub
- Testing and coverage with pytest and codecov
- Documentation with MkDocs
- Compatibility testing for multiple versions of Python with tox-uv
- Containerization with Docker or Podman
- Development environment with VSCode devcontainers
An example of a repository generated with this package can be found here.
Quickstart¶
On your local machine, navigate to the directory in which you want to create a project directory, and run the following command:
uvx cookiecutter https://github.com/foreverYoungGitHub/cookiecutter-pytorch-lightning.git
or if you don't have uv
installed yet:
pip install cookiecutter
cookiecutter https://github.com/foreverYoungGitHub/cookiecutter-pytorch-lightning.git
Follow the prompts to configure your project. Once completed, a new directory containing your project will be created. Then navigate into your newly created project directory and follow the instructions in the README.md
to complete the setup of your project.
Acknowledgements¶
This project is partially based on Florian Maas\'s great cookiecutter-uv and Lukas\'s great lightning-hydra-template repository.