Package: lightningtrain
LightningTrainA clean and simple PyTorch Lightning + Hydra projects.📌  IntroductionThis repository contains a simple PyTorch Lightning + Hydra project template. It is designed to be a starting point for your own projects. It is based on thePyTorch Lightning.📦  Main TechnologiesPyTorch Lightning- a lightweight PyTorch wrapper for high-performance AI research. Think of it as a framework for organizing your PyTorch code.Hydra- a framework for elegantly configuring complex applications. The key feature is the ability to dynamically create a hierarchical configuration by composition and override it through config files and the command line.📁  Project StructureThe directory structure of new project looks like this:configs
│   ├── data                     <- Data configs
configs
│   ├── hydra                    <- Hydra configs
│   ├── local                    <- Local configs
│   ├── model                    <- Model configs
│   ├── paths                    <- Project paths configs
│   ├── trainer                  <- Trainer configs
│   ├── eval.yaml             <- Main config for evaluation
│   └── train.yaml            <- Main config for training
│
├── data                   <- Project data
│
├── logs                   <- Logs generated by hydra and lightning loggers
│
├── notebooks              <- Jupyter notebooks. Naming convention is a number (for ordering),
│                             the creator's initials, and a short `-` 
│
├── lightningtrain                    <- Source code
│   ├── data                     <- Data scripts
│   ├── models                   <- Model scripts
│   ├── utils                    <- Utility scripts
│   │
│   ├── eval.py                  <- Run evaluation
│   └── train.py                 <- Run training
│
├── tests                  <- Tests of any kind
│
├── .gitignore                <- List of files ignored by git
├── .project-root             <- File for inferring the position of project root directory
├── Makefile                  <- Makefile with commands like `make train` or `make test`
├── pyproject.toml            <- Configuration options for testing and linting
├── requirements.txt          <- File for installing python dependencies
├── setup.py                  <- File for installing project as a package
└── README.md🚀  Quickstart# clone projectgitclonehttps://github.com/dlwizard/lightningflow.gitcdlightningflow# create docker container with .devcontainer.json# or install dependencies locally# install project as a packagepipinstall-e.# run traininglightningtrain_traindata.num_workers=16# run evaluationlightningtrain_evaldata.num_workers=16📝  Docker container usage instructionsPrerequisites:DockerVisual Studio CodeRemote - ContainersextensionSteps:Clone this repositoryOpen the repository in Visual Studio Codepress crtl+shift+p and select "Remote-Containers: Reopen in Container"Wait for the container to buildOpen a terminal in Visual Studio Code and run the following commands:# install project as a package
pip install -e .

# run training
lightningtrain_train data.num_workers=16

# run evaluation
lightningtrain_eval data.num_workers=16📝 Instructions for PyPi package usagePrerequisites:Python 3.10pipvirtualenvSteps:python -m venv venvsource venv\Scripts\activatepython3 -m pip install lightningtrainlightningtrain_train data.num_workers=16lightningtrain_eval data.num_workers=16ReferencesPyTorch LightningHydra