Skip to main content

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

Speed Benchmark

See speed benchmark doc

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

lightning-template-1.0.15.tar.gz (21.5 kB view hashes)

Uploaded Source

Built Distribution

lightning_template-1.0.15-py3-none-any.whl (31.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page