Pytorch Lightning code guideline for conferences

Overview

Deep learning project seed

Use this seed to start new deep learning / ML projects.

  • Built in setup.py
  • Built in requirements
  • Examples with MNIST
  • Badges
  • Bibtex

Goals

The goal of this seed is to structure ML paper-code the same so that work can easily be extended and replicated.

DELETE EVERYTHING ABOVE FOR YOUR PROJECT


Your Project Name

Paper Conference Conference Conference

CI testing

Description

What it does

How to run

First, install dependencies

# clone project   
git clone https://github.com/YourGithubName/deep-learning-project-template

# install project   
cd deep-learning-project-template 
pip install -e .   
pip install -r requirements.txt

Next, navigate to any file and run it.

# module folder
cd project

# run module (example: mnist as your main contribution)   
python lit_classifier_main.py    

Imports

This project is setup as a package which means you can now easily import any file into any other file like so:

from project.datasets.mnist import mnist
from project.lit_classifier_main import LitClassifier
from pytorch_lightning import Trainer

# model
model = LitClassifier()

# data
train, val, test = mnist()

# train
trainer = Trainer()
trainer.fit(model, train, val)

# test using the best model!
trainer.test(test_dataloaders=test)

Citation

@article{YourName,
  title={Your Title},
  author={Your team},
  journal={Location},
  year={Year}
}
Comments
  • prune seed

    prune seed

    remove production_mnist as it the same as research_mnist just using a deprecated dictionary on the __step_end

    some next steps/PRs

    • add testing
    • generating docs

    pretty much adding CI/docs tools as we have in Sandbox

    enhancement 
    opened by Borda 2
  • promote unit testing in open research

    promote unit testing in open research

    should we promote from here to provide minimal unitests ?

    it's the first thing I check in research repos and usually none of them provide minimum testing, which makes me doubt about the reliability of showed results in the paper.

    enhancement 
    opened by edgarriba 2
  • Update seed for 1.0.0. TrainResult and EvalResult are deprecated and throws an error

    Update seed for 1.0.0. TrainResult and EvalResult are deprecated and throws an error

    In my own project using this seed, I updated to 1.0.0rc2 to discover that TrainResult and EvalResult are deprecated.

    For example, I got the error: AttributeError: module 'pytorch_lightning' has no attribute 'EvalResult'

    It would be great if this repo can be used with the upcoming 1.0.0 release.

    enhancement 
    opened by NumesSanguis 1
  • GitHub Template

    GitHub Template

    @williamFalcon have you considered making this a GitHub Template?

    "After you make your repository a template, anyone with access to the repository can generate a new repository with the same directory structure and files."

    opened by dsevero 1
  • Generic extension of this template with Hydra configs

    Generic extension of this template with Hydra configs

    Recently I've been trying to develop a very general PyTorch Lightning + Hydra template.

    The idea is to extend deep-learning-project-template, by just adding some Hydra config structure and simple example, which initializes modules from config parts in the most generic and obvious way.

    I've been wondering if it would be a good idea to develop an official template of this sort and add it to Lightning ecosystem as an alternative for deep-learning-project-template? Currently it seems like Hydra is still a little rough around the edges and it's not obvious how config should be structured for Lightning, but still such a template could be a useful addition in the future.

    Here is a link to my version: https://github.com/hobogalaxy/lightning-hydra-template

    opened by ashleve 0
  • Xtef!

    Xtef!

    clone project

    git clone https://github.com/YourGithubName/deep-learning-project-template

    install project

    cd deep-learning-project-template pip install -e .
    pip install -r requirements.txt Next, navigate to any file and run it.

    module folder

    cd project

    run module (example: mnist as your main contribution)

    python lit_classifier_main.py
    Imports

    This project is setup as a package which means you can now easily import any file into any other file like so:

    from project.datasets.mnist import mnist from project.lit_classifier_main import LitClassifier from pytorch_lightning import Trainer

    model

    model = LitClassifier()

    data

    train, val, test = mnist()

    train

    trainer = Trainer() trainer.fit(model, train, val)

    test using the best model!

    trainer.test(test_dataloaders=test) Citation

    @article{YourName, title={Your Title}, author={Your team}, journal={Location}, year={Year} great={vocal} Asp.2n={kesnting}

    opened by Xay140X 0
  • Examples using all the hooks

    Examples using all the hooks

    I think it would be more than beneficial to provide an example that would use all the hooks from the LightningModule and LightningDataModule so that the end user has a clear overview about customisation and use.

    opened by siovaneDAZN 0
  • Parameter hidden_dim unused

    Parameter hidden_dim unused

    Hey,

    I was just quickly browsing through the templates when I noticed that for the Autoencoder project the argparse parameter 'hidden_dim' is unused:

    https://github.com/PyTorchLightning/deep-learning-project-template/blob/faef5bbf4f3c392b9e4d71e606edaab5ce4d0aaf/project/lit_autoencoder.py#L54

    I suspect this should be used by the model to define the number of hidden dimensions. The other argparse parameter is probably accounted for in the Trainer (me: new to lightning). Thanks for this useful project.

    bug 
    opened by cheind 0
  • Torch Hub Support

    Torch Hub Support

    Add torch.hub support like so:

    import torch
    model = torch.hub.load(
        "pytorchlightning/deep-learning-project-template",
        "lit_classifier",
    )
    
    opened by teddykoker 2
Owner
Pytorch Lightning
Pytorch Lightning
An essential implementation of BYOL in PyTorch + PyTorch Lightning

Essential BYOL A simple and complete implementation of Bootstrap your own latent: A new approach to self-supervised Learning in PyTorch + PyTorch Ligh

Enrico Fini 48 Sep 27, 2022
Generic template to bootstrap your PyTorch project with PyTorch Lightning, Hydra, W&B, and DVC.

NN Template Generic template to bootstrap your PyTorch project. Click on Use this Template and avoid writing boilerplate code for: PyTorch Lightning,

Luca Moschella 520 Dec 30, 2022
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pytorch Lightning 1.4k Jan 1, 2023
A general framework for deep learning experiments under PyTorch based on pytorch-lightning

torchx Torchx is a general framework for deep learning experiments under PyTorch based on pytorch-lightning. TODO list gan-like training wrapper text

Yingtian Liu 6 Mar 17, 2022
Pytorch Lightning Distributed Accelerators using Ray

Distributed PyTorch Lightning Training on Ray This library adds new PyTorch Lightning accelerators for distributed training using the Ray distributed

null 166 Dec 27, 2022
Pytorch Lightning Distributed Accelerators using Ray

Distributed PyTorch Lightning Training on Ray This library adds new PyTorch Lightning plugins for distributed training using the Ray distributed compu

null 167 Jan 2, 2023
PyTorch Lightning implementation of Automatic Speech Recognition

lasr Lightening Automatic Speech Recognition An MIT License ASR research library, built on PyTorch-Lightning, for developing end-to-end ASR models. In

Soohwan Kim 40 Sep 19, 2022
A small demonstration of using WebDataset with ImageNet and PyTorch Lightning

A small demonstration of using WebDataset with ImageNet and PyTorch Lightning

Tom 50 Dec 16, 2022
A PyTorch Lightning solution to training OpenAI's CLIP from scratch.

train-CLIP ?? A PyTorch Lightning solution to training CLIP from scratch. Goal ⚽ Our aim is to create an easy to use Lightning implementation of OpenA

Cade Gordon 396 Dec 30, 2022
A small demonstration of using WebDataset with ImageNet and PyTorch Lightning

A small demonstration of using WebDataset with ImageNet and PyTorch Lightning This is a small repo illustrating how to use WebDataset on ImageNet. usi

null 50 Dec 16, 2022
An AutoML Library made with Optuna and PyTorch Lightning

An AutoML Library made with Optuna and PyTorch Lightning Installation Recommended pip install -U gradsflow From source pip install git+https://github.

GradsFlow 294 Dec 17, 2022
Semantic Segmentation with Pytorch-Lightning

This is a simple demo for performing semantic segmentation on the Kitti dataset using Pytorch-Lightning and optimizing the neural network by monitoring and comparing runs with Weights & Biases.

Boris Dayma 58 Nov 18, 2022
Cookiecutter PyTorch Lightning

Cookiecutter PyTorch Lightning Instructions # install cookiecutter pip install cookiecutter

Mazen 8 Nov 6, 2022
Unofficial Pytorch Lightning implementation of Contrastive Syn-to-Real Generalization (ICLR, 2021)

Unofficial Pytorch Lightning implementation of Contrastive Syn-to-Real Generalization (ICLR, 2021)

Gyeongjae Choi 17 Sep 23, 2021
An Agnostic Computer Vision Framework - Pluggable to any Training Library: Fastai, Pytorch-Lightning with more to come

IceVision is the first agnostic computer vision framework to offer a curated collection with hundreds of high-quality pre-trained models from torchvision, MMLabs, and soon Pytorch Image Models. It orchestrates the end-to-end deep learning workflow allowing to train networks with easy-to-use robust high-performance libraries such as Pytorch-Lightning and Fastai

airctic 789 Dec 29, 2022
A PyTorch Lightning Callback for pushing models to the Hugging Face Hub 🤗⚡️

hf-hub-lightning A callback for pushing lightning models to the Hugging Face Hub. Note: I made this package for myself, mostly...if folks seem to be i

Nathan Raw 27 Dec 14, 2022
The spiritual successor to knockknock for PyTorch Lightning, get notified when your training ends

Who's there? The spiritual successor to knockknock for PyTorch Lightning, to get a notification when your training is complete or when it crashes duri

twsl 70 Oct 6, 2022
Neural Scene Flow Fields using pytorch-lightning, with potential improvements

nsff_pl Neural Scene Flow Fields using pytorch-lightning. This repo reimplements the NSFF idea, but modifies several operations based on observation o

AI葵 178 Dec 21, 2022
Lava-DL, but with PyTorch-Lightning flavour

Deep learning project seed Use this seed to start new deep learning / ML projects. Built in setup.py Built in requirements Examples with MNIST Badges

Sami BARCHID 4 Oct 31, 2022