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, 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

This version

1.0.7

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.7.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

lightning_template-1.0.7-py3-none-any.whl (27.3 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