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, the experiment manager feature, auto-implementing multi-node, multi-device, multi-accelerator support, etc.
- Powerful deep update feature for config file inherit to manage your config files more hierarchically, see also recommend structure.
- Multi and complex optimizers and lr_scheduler from CLI config support, see doc.
- Cross-validation support with only one argument you have to change, see doc.
- Hyperparameters tuning via Wandb, see the doc and wandb sweep.
- Powerful and flexible LightningModule and LightningDataModule base class.
- Useful auto lr finder and auto batch size scaler, see doc.
Installation
See installation docs for details.
Usage
CLI
This project is based on the lightning CLI, so it supports all features from pytorch lightning and lightning CLI, you can get a brief introduction from cli doc.
Create models and datasets
Like pytorch lightning, we use LightningModule to implement the model and train, val, and test loop, and use LightningDataModule to implement dataset and dataloaders, for detail, see model doc and dataset doc
Config optimizers and lr schedulers
pytorch lightning does not support multi optimizers and lr schedulers from cli, we add this feature, see doc for detail.
Cross-validation
Set num_folds
of the trainer to an 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](docs/configs/argument_parsers/json_file.md)
You can get some examples 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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46888e7923ebc0da40c826b933d8043a1c98bee612fb5897c1b10c3747120674 |
|
MD5 | f5c41e821f597be423f917e7009db9f2 |
|
BLAKE2b-256 | 6b6212baec011ceb1999499abe2c5b3bc3d8d2ea325c14a7df7cf9b518a6f6af |
Hashes for lightning_template-1.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbe283b918357f6c7329ee87d515945feb57185cbc9f456cd8a1e27a5979e40c |
|
MD5 | af512abc1ac078078c33d9bee6877902 |
|
BLAKE2b-256 | 2de34931e3da3e38bb4ee52f3826f6872980d326c09a1f7049e1558a8f7d174e |