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.0.tar.gz (20.9 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.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lightning-template-1.1.0.tar.gz
  • Upload date:
  • Size: 20.9 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.0.tar.gz
Algorithm Hash digest
SHA256 b455acff712482d465890a17454a12f22ef9d5d16fd4f83c41193464d5222f34
MD5 03a0854191622730411e9d330a64fd96
BLAKE2b-256 c248b886be1ff3ffbf4a96c7b0d9249b3e5245dfdf833ac9ddef9670283c914f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightning_template-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44e674ab8838890084cc1bfae9d5db55fba095db511dc82ddf384f6fd688ae8a
MD5 8d8ab08cd1d031dbd3c81399d94efc30
BLAKE2b-256 07cbac84e63fec931df386e2afbdb38953d46eb7c67bcb6f35fc9f33c6542bd2

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