Skip to content

Latest commit

 

History

History
112 lines (75 loc) · 2.56 KB

README.md

File metadata and controls

112 lines (75 loc) · 2.56 KB

42AI - Lab Template

PyTorch Lightning Config: Hydra Template
Paper Conference

Description

This is 42AI Lab Template.


This template is Research Ready.

It will allow for fast and high quality experiment, development, and results analysis.


There is still some work to do such that we can make it production ready.

For high quality inference these next steps seems wise:

  • Adding ONNX support
  • Docker compliant
  • Fast API server

How to run

Install dependencies

# clone project
git clone https://github.com/42-AI/Template_Lab
cd Template_Lab

# Setup the repository
.42AI/init.sh

Train your model

python train.py
Train model with default configuration
# train on CPU
python train.py trainer.gpus=0

# train on GPU
python train.py trainer.gpus=1
Train model with chosen experiment configuration from [configs/experiment/](configs/experiment/)
python train.py experiment=experiment_name.yaml
You can override any parameter from command line like this
python train.py trainer.max_epochs=20 datamodule.batch_size=64
Multi run experiment
python train.py -m experiment=fashion_conv "++model.net.dropout=range(0,.5,.1)" "++model.lr=1e-2,1e-3"

Acknowledgements

Thanks ashleve/lightning-hydra-template for your great template.

There is more details on their Readme about this template usage