Mini-Lightning is a lightweight machine learning training library, which is a mini version of Pytorch-Lightning with only 1k lines of code. It has the advantages of faster, more concise and more flexible.
Mini-Lightning is a machine learning training library, which is a mini version of Pytorch Lightning with only 1k lines of code. It has the advantages of faster, more concise and more flexible.
Existing features: support for DDP(multi-node and multi-gpu), Sync-BN, DP, AMP, gradient accumulation, warmup and lr_scheduler, grad clip, tensorboard, model and result saving, beautiful console log, torchmetrics, etc.
Only the minimal interfaces are exposed, keeping the features of simplicity, easy to read, use and extend. Additional functions can be found in ml_alg
examples can be found in /examples/
If you have any problems or bug finding, please raise issue, Thank you.
Install
Download the latest version(>=1.12) of Torch(corresponding CUDA version) from the official website of Torch. It is not recommended to automatically install Torch (CUDA 10.2) using the Mini-Lightning dependency, which will cause CUDA version mismatch.
Install mini-lightning
# from pypi
pip install mini-lightning
# Or download the files from the repository to local,# and go to the folder where setup.py is located, and run the following command
pip install .
Use
First, you need to complete the steps to install the Mini-Lightning