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 lib

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.1.7.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lightning_template-1.1.7-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file lightning-template-1.1.7.tar.gz.

File metadata

  • Download URL: lightning-template-1.1.7.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for lightning-template-1.1.7.tar.gz
Algorithm Hash digest
SHA256 60e335c831d55639495ff13648832bcf8ec1053b332ff148d39046eac07eae30
MD5 e6442f162fd1e8839562bf0ea9a578aa
BLAKE2b-256 2b13c49d9f0083db21a4a66f4fb47daf397d705026e05b7c5176853484c8ceeb

See more details on using hashes here.

File details

Details for the file lightning_template-1.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for lightning_template-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bf8018f076814bc3c7231d91196390f9e9073710e6d86d2be84a275a0129a077
MD5 4bb71a3cc0cebb44862b369c85ae7899
BLAKE2b-256 b9b4595f7af54439693861a6a5403555823d8030ce79ba463d608254d71de1af

See more details on using hashes here.

Supported by

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