Skip to content

kredde/pytorch-lightning-hydra-mlflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pytorch Lightning Template using Hydra and MLFlow

PyTorch Lightning Config: Hydra Tracking: MLFlow

Quick start

  1. Install dependencies conda env create -f environment.yml -n envname
  2. Run an experiment using python3 main.py +experiment=exp_name
  3. Check out the results of your runs using mlflow ui
  4. Reload your experiment and execute evaluations by specifying the run id exp_id: id and running the evaluation pipeline python3 evaluation.py +experiment=exp_name

Train model with default configuration

# default
python run.py

# train on CPU
python run.py trainer.gpus=0

# train on GPU
python run.py trainer.gpus=1

Train model with chosen experiment configuration from configs/experiment/

python run.py +experiment=experiment_name

You can override any parameter from command line like this

python run.py trainer.max_epochs=20 datamodule.batch_size=64

Other Repositories

Inspirations

This template was inspired by:

ashleve/lightning-hydra-template,

PyTorchLightning/deep-learninig-project-template,

drivendata/cookiecutter-data-science,

tchaton/lightning-hydra-seed,

Erlemar/pytorch_tempest,

lucmos/nn-template.