A template wrapper for pytorch-lightning.
Project description
Introduction
A generic project template lib based on pytorch lightning for project-template
Feature
- All features from pytorch lightning and lightning CLI. Especially, experiment manager feature, auto implement multi-node, multi-device, multi-accelerator support, etc.
- Powerful deep update feature for config file inherit to manage your config files in a more hierarchical way, see also recommand config file structure.
- Multi and complex optimizers and lr_scheduler from CLI config support, see doc.
- Powerful and flexible LightningModule and LightningDataModule base class.
- Cross-validation support with only one argument you have to change.
- Useful auto lr finder and auto batch size scaler.
Installation
See installation docs for details.
Usage
CLI
This project base on the lightning CLI, so it support all feature from pytorch lightning and lightning CLI, you can get a brief introduction from cli doc.
Create models and datasets
As pytorch lightning, we use LightningModule to implement the model and train, val and test loop, use LightningDataModule to implement dataset and dataloaders, for detail, see model doc and dataset doc
Config optimizers and lr schedulers
pytorch lightning do not support multi optimizers and lr schedulers from cli, we add this feature, see doc for detail.
Cross-validation
Set num_folds
of trainer to a int bigger than one to start cross-validation, for details, see doc.
Config files
See config file structure, deep update, yaml with merge and json file
You can get some example from project_template
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lightning-template-1.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7564c0bcef7801ae282d85694e5a6a124d8bc27b207ae060c0c0b3b445fccaa2 |
|
MD5 | 6e8f5967114ad2d1aaaf5b4f93961475 |
|
BLAKE2b-256 | a0da80faaad1413be61517248b9188a9abfa7bb2ca4ead36fbd09e80416ca8d9 |
Hashes for lightning_template-1.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fd092b3e5a8dd84e6adac20a87064c391202309da9187fbc55e10eb2499049a |
|
MD5 | 01cd2fe8aa9da261bd638157a910f92b |
|
BLAKE2b-256 | 367c9895387803e916b6aea55ac001b238d371e81bdc12ae32b3398e0a184cbc |