From 8d55f151bdcc28cb7620ee2ed7f3d56bbae95db5 Mon Sep 17 00:00:00 2001 From: hobogalaxy Date: Sat, 28 Nov 2020 01:14:17 +0100 Subject: [PATCH 1/3] add conda env file --- .gitignore | 2 - README.md | 34 +++++-- SETUP.md | 92 +++++++++---------- conda_env.yml | 13 +++ ...project_config.yaml => project_config.yml} | 0 project/{run_configs.yaml => run_configs.yml} | 0 project/train.py | 13 ++- project/utils/callbacks.py | 4 +- project/utils/execute_sweep.py | 4 +- requirements.txt | 1 - 10 files changed, 97 insertions(+), 66 deletions(-) create mode 100644 conda_env.yml rename project/{project_config.yaml => project_config.yml} (100%) rename project/{run_configs.yaml => run_configs.yml} (100%) diff --git a/.gitignore b/.gitignore index 114bd81..d462496 100644 --- a/.gitignore +++ b/.gitignore @@ -229,5 +229,3 @@ project/data/ project/lightning_logs/ project/wandb/ project/logs/ - -project/project_config.yaml diff --git a/README.md b/README.md index 54a7f20..f58ea0b 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,19 @@ A convenient starting template for most deep learning projects. Built with Py ## Setup -Read [SETUP.md](SETUP.md) -

+Read [SETUP.md](SETUP.md) for more info or just do this quick setup: +``` + git clone https://github.com/kinoai/hackathon-template + cd hackathon-template + conda update conda + conda env create -f conda_env.yml -n hack_env + conda activate hack_env + pip install -r requirements.txt + wandb login + cd project + python train.py +``` +
## Project structure @@ -50,7 +61,8 @@ The directory structure of new project looks like this: └── requirements.txt ``` -## Project config parameters ([project_config.yaml](project/project_config.yaml)) + +## Project config parameters ([project_config.yaml](project/project_config.yml)) ```yaml num_of_gpus: -1 @@ -89,7 +101,8 @@ printing: profiler: False ``` -## Run config parameters ([run_configs.yaml](project/run_configs.yaml)) + +## Run config parameters ([run_configs.yaml](project/run_configs.yml)) You can store many run configurations in this file.
Example run configuration: ```yaml @@ -116,10 +129,17 @@ MNIST_CLASSIFIER_V1: num_workers: 4 pin_memory: True ``` -The run configuration that you want to train with needs to be chosen in [train.py](project/train.py): +To run training pass run config name as an argument: +``` + python train.py -c MNIST_CLASSIFIER_V1 + python train.py --conf_name MNIST_CLASSIFIER_V1 +``` +Or modify default run config name in [train.py](project/train.py): ```python if __name__ == "__main__": - RUN_CONFIG_NAME = "MNIST_CLASSIFIER_V1" - main(run_config_name=RUN_CONFIG_NAME) + parser = ArgumentParser() + parser.add_argument("-c", "--conf_name", type=str, default="MNIST_CLASSIFIER_V1") + args = parser.parse_args() + main(run_config_name=args.conf_name) ``` diff --git a/SETUP.md b/SETUP.md index ced5492..98048b1 100644 --- a/SETUP.md +++ b/SETUP.md @@ -1,48 +1,54 @@ ## Setup +1. Install anaconda if you don't already have it -#### 1. Install anaconda -https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html + https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html -#### 2. Create anaconda env -``` - conda create --name hack_env - conda activate hack_env -``` +2. Clone repo + ``` + git clone https://github.com/kinoai/hackathon-template + cd hackathon-template + ``` +3. Create conda environment (change 'hack_env' to any name you want) + ``` + conda update conda + conda env create -f conda_env.yml -n hack_env + conda activate hack_env + ``` +4. Make sure proper python PATH is loaded
+ - Unix + ``` + which python + ``` + - Windows + ``` + for %i in (python.exe) do @echo. %~$PATH:i + ``` + Expected result: `PATH_TO_CONDA/envs/ENV_NAME/bin/python` +5. Install requirements + ``` + pip install -r requirements.txt + ``` +6. Log to your Weights&Biases account + ``` + wandb login + ``` +7. Run training + ``` + cd project + python train.py + ``` +
-#### 3. Make sure proper python PATH is loaded -Unix -``` - which python -``` -Windows -``` - for %i in (python.exe) do @echo. %~$PATH:i -``` -Expected result: `PATH_TO_CONDA/envs/ENV_NAME/bin/python` -#### 4. Install pytorch with conda -Installation command generator: https://pytorch.org/get-started/locally/ -``` - conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch -``` +#### Important notes! +- If you are not using GPU (CUDA incompatible GPU) you may need to specify the number of GPUs manually instead of leaving the default `-1` in `project_config.yaml`: + ``` + num_of_gpus: 0 + ``` +
-#### 5. Clone repo -``` - git clone https://github.com/kinoai/hackathon-template -``` -#### 6. Install requirements with pip -``` - cd hackathon-template - pip install -r requirements.txt -``` - -#### 7. Log into your wandb account -``` - wandb login -``` - -#### 8. PyCharm setup +## PyCharm setup - open this repository as PyCharm project - set "hack_env" as project interpreter:
`Ctrl + Shift + A -> type "Project Interpreter"` @@ -51,12 +57,4 @@ Installation command generator: https://pytorch.org/get-started/locally/ - set terminal emulation:
`Ctrl + Shift + A -> type "Edit Configurations..." -> select "Emulate terminal in output console"` - run training:
-`right click on train.py file -> "Run 'train'"` - - - -#### Important notes! -- If you are not using GPU (CUDA incompatible GPU) you may need to specify the number of GPUs manually instead of leaving the default `-1` in `config.yaml`: -``` - num_of_gpus: 0 -``` \ No newline at end of file +`right click on train.py file -> "Run 'train'"` \ No newline at end of file diff --git a/conda_env.yml b/conda_env.yml new file mode 100644 index 0000000..05f0853 --- /dev/null +++ b/conda_env.yml @@ -0,0 +1,13 @@ +#name: hack_env +channels: + - pytorch + - conda-forge + - defaults +dependencies: + - python=3.8 + - pip + - cudatoolkit + - pytorch + - torchvision + - torchaudio +#prefix: C:\Users\UserX\Anaconda3\envs\hack_env diff --git a/project/project_config.yaml b/project/project_config.yml similarity index 100% rename from project/project_config.yaml rename to project/project_config.yml diff --git a/project/run_configs.yaml b/project/run_configs.yml similarity index 100% rename from project/run_configs.yaml rename to project/run_configs.yml diff --git a/project/train.py b/project/train.py index 22ddbc0..b4b79f3 100644 --- a/project/train.py +++ b/project/train.py @@ -1,4 +1,5 @@ from pytorch_lightning.profiler import SimpleProfiler +from argparse import ArgumentParser import yaml # utils @@ -7,7 +8,6 @@ from utils.callbacks import * def train(project_config, run_config): - # Init PyTorch Lightning model ⚡ lit_model = init_lit_model(hparams=run_config["model"]) @@ -83,13 +83,16 @@ def load_config(path): def main(run_config_name): # Load configs - project_config = load_config("project_config.yaml") - run_config = load_config("run_configs.yaml")[run_config_name] + project_config = load_config("project_config.yml") + run_config = load_config("run_configs.yml")[run_config_name] # Train model train(project_config=project_config, run_config=run_config) if __name__ == "__main__": - RUN_CONFIG_NAME = "MNIST_CLASSIFIER_V2" - main(run_config_name=RUN_CONFIG_NAME) + parser = ArgumentParser() + parser.add_argument("-c", "--conf_name", type=str, default="MNIST_CLASSIFIER_V1") + args = parser.parse_args() + + main(run_config_name=args.conf_name) diff --git a/project/utils/callbacks.py b/project/utils/callbacks.py index 7fcf92c..91b55ad 100644 --- a/project/utils/callbacks.py +++ b/project/utils/callbacks.py @@ -137,8 +137,8 @@ class SaveCodeToWandbCallback(pl.Callback): "utils/callbacks.py", "utils/init_utils.py", "train.py", - "project_config.yaml", - "run_configs.yaml", + "project_config.yml", + "run_configs.yml", ] self.model_path = os.path.dirname(inspect.getfile(lit_model.__class__)) self.datamodule_path = os.path.dirname(inspect.getfile(datamodule.__class__)) diff --git a/project/utils/execute_sweep.py b/project/utils/execute_sweep.py index 3853246..65549ad 100644 --- a/project/utils/execute_sweep.py +++ b/project/utils/execute_sweep.py @@ -8,8 +8,8 @@ import train RUN_CONFIG_NAME = "MNIST_CLASSIFIER_V1" # Load configs -project_config = train.load_config("../project_config.yaml") -run_config = train.load_config("../run_configs.yaml")[RUN_CONFIG_NAME] +project_config = train.load_config("../project_config.yml") +run_config = train.load_config("../run_configs.yml")[RUN_CONFIG_NAME] # Initialize wandb wandb.init() diff --git a/requirements.txt b/requirements.txt index f32e33e..0cf9024 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,3 @@ pytorch-lightning-bolts>=0.2.5 wandb>=0.10.11 PyYAML>=5.3.1 scikit-learn>=0.23.2 -efficientnet-pytorch>=0.7.0 From ad0344d0a18c5f84ad53e79e490b1aa7cf933428 Mon Sep 17 00:00:00 2001 From: hobogalaxy Date: Sun, 29 Nov 2020 16:04:00 +0100 Subject: [PATCH 2/3] many small improvements --- README.md | 138 ++++++++++-------- SETUP.md | 3 +- conda_env.yml => conda_env.yaml | 0 .../mnist_digits_datamodule/datasets.py | 0 .../models/example_model/lightning_module.py | 7 +- ...project_config.yml => project_config.yaml} | 2 +- project/{run_configs.yml => run_configs.yaml} | 0 project/train.py | 4 +- project/utils/callbacks.py | 4 +- project/utils/execute_sweep.py | 4 +- project/utils/predict_example.py | 4 +- 11 files changed, 90 insertions(+), 76 deletions(-) rename conda_env.yml => conda_env.yaml (100%) create mode 100644 project/data_modules/mnist_digits_datamodule/datasets.py rename project/{project_config.yml => project_config.yaml} (97%) rename project/{run_configs.yml => run_configs.yaml} (100%) diff --git a/README.md b/README.md index f58ea0b..4f79ecd 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ A convenient starting template for most deep learning projects. Built with Py ## Setup -Read [SETUP.md](SETUP.md) for more info or just do this quick setup: +Read [SETUP.md](SETUP.md) for more info and explanations or just do this quick setup: ``` - git clone https://github.com/kinoai/hackathon-template - cd hackathon-template - conda update conda - conda env create -f conda_env.yml -n hack_env - conda activate hack_env - pip install -r requirements.txt - wandb login - cd project - python train.py +git clone https://github.com/kinoai/hackathon-template +cd hackathon-template +conda update conda +conda env create -f conda_env.yaml -n hack_env +conda activate hack_env +pip install -r requirements.txt +wandb login +cd project +python train.py ```
@@ -58,88 +58,98 @@ The directory structure of new project looks like this: ├── LICENSE ├── README.md ├── SETUP.md +├── conda_env.yaml └── requirements.txt ``` -## Project config parameters ([project_config.yaml](project/project_config.yml)) +## Project config parameters ([project_config.yaml](project/project_config.yaml)) ```yaml -num_of_gpus: -1 +num_of_gpus: -1 <- '-1' to use all gpus available, '0' to train on cpu resume_training: - lightning_ckpt: - resume_from_ckpt: False - ckpt_path: "logs/checkpoints/epoch=2.ckpt" + lightning_ckpt: + resume_from_ckpt: False <- set True if you want to resume + ckpt_path: "epoch=7.ckpt" <- path to your checkpoint wandb: - resume_wandb_run: False - wandb_run_id: "8uuomodb" + resume_wandb_run: False <- set True if you want to resume Weight&Biases run + wandb_run_id: "8uuomodb" <- id of Weight&Biases run you want to resume loggers: wandb: - project: "hackathon_template_test" - team: "kino" - group: None - job_type: "train" - tags: [] - log_model: True - offline: False + project: "project_name" <- wandb project name + team: "kino" <- wandb entity name + group: None <- wandb group name + job_type: "train" <- wandb job_type name + tags: [] <- wandb tags name + log_model: True <- set True if you want to upload ckpts to wandb automatically + offline: False <- set True if you want to store all data locally callbacks: checkpoint: - monitor: "val_acc" - save_top_k: 1 - save_last: True - mode: "max" + monitor: "val_acc" <- name of the logged metric that determines when model is improving + save_top_k: 1 <- save k best models (determined by above metric) + save_last: True <- additionaly always save model from last epoch + mode: "max" <- can be "max" or "min" early_stop: - monitor: "val_acc" - patience: 100 - mode: "max" + monitor: "val_acc" <- name of the logged metric that determines when model is improving + patience: 100 <- how many epochs of not improving until training stops + mode: "max" <- can be "max" or "min" printing: - progress_bar_refresh_rate: 5 - weights_summary: "top" # "full" - profiler: False + progress_bar_refresh_rate: 5 <- refresh rate of training bar in terminal + weights_summary: "top" <- print summary of model (alternatively "full") + profiler: False <- set True if you want to see execution time profiling ``` -## Run config parameters ([run_configs.yaml](project/run_configs.yml)) +## Run config parameters ([run_configs.yaml](project/run_configs.yaml)) You can store many run configurations in this file.
Example run configuration: ```yaml MNIST_CLASSIFIER_V1: - trainer: - min_epochs: 1 - max_epochs: 5 - gradient_clip_val: 0.5 - accumulate_grad_batches: 1 - limit_train_batches: 1.0 - model: - model_folder: "simple_mnist_classifier" - lr: 0.001 - weight_decay: 0.000001 - input_size: 784 # img size is 1*28*28 + trainer: <- lightning 'Trainer' parameters (all except 'max_epochs' are optional) + max_epochs: 5 <- number of training epochs + gradient_clip_val: 0.5 <- gradient clipping value (helps with exploding gradient issues) + accumulate_grad_batches: 3 <- optimise after accumulating gradient from 3 batches + limit_train_batches: 1.0 <- 0.6 would mean to train only on 60% of training data + model: <- all of the parameters here will be passed to 'LitModel' in 'hparams' dictionary + model_folder: "simple_mnist_classifier" <- name of folder from which 'lightning_module.py' (with 'LitMdodel' class) will be loaded + lr: 0.001 <- learning rate + weight_decay: 0.000001 <- L2 normalization set in optimizer + input_size: 784 # img size for mnist digits is 1*28*28 output_size: 10 # there are 10 digit classes lin1_size: 256 lin2_size: 256 lin3_size: 128 - dataset: - datamodule_folder: "mnist_digits_datamodule" - batch_size: 256 - train_val_split_ratio: 0.9 - num_workers: 4 - pin_memory: True -``` -To run training pass run config name as an argument: + dataset: <- all of the parameters here will be passed to 'DataModule' in 'hparams' dictionary + datamodule_folder: "mnist_digits_datamodule" <- name of folder from which 'datamodule.py' (with 'DataModule' class) will be loaded + batch_size: 256 <- batch size + train_val_split_ratio: 0.9 <- split ratio between training and validation set + num_workers: 1 <- how many subprocesses to use for data loading + pin_memory: False <- if True, the data loader will copy Tensors into CUDA pinned memory before returning them. ``` + + +## Workflow +1. Add your model to 'project/models' folder
+ (you need to create folder with 'lightning_module.py' file containing 'LitModel' class) +2. Add your datamodule to 'project/data_modules' folder
+ (you need to create folder with 'datamodule.py' file containig 'DataModule' class) +3. Add your run config to [run_configs.yaml](project/run_configs.yaml) (specify there folders containing your model and datamodule) +3. Configure [project_config.yaml](project/project_config.yaml) +4. Run training:
+ Either pass run config name as an argument: + ``` python train.py -c MNIST_CLASSIFIER_V1 python train.py --conf_name MNIST_CLASSIFIER_V1 -``` -Or modify default run config name in [train.py](project/train.py): -```python -if __name__ == "__main__": - parser = ArgumentParser() - parser.add_argument("-c", "--conf_name", type=str, default="MNIST_CLASSIFIER_V1") - args = parser.parse_args() - - main(run_config_name=args.conf_name) -``` + ``` + Or modify default run config name in [train.py](project/train.py): + ```python + if __name__ == "__main__": + parser = ArgumentParser() + parser.add_argument("-c", "--conf_name", type=str, default="MNIST_CLASSIFIER_V1") + args = parser.parse_args() + + main(run_config_name=args.conf_name) + ``` diff --git a/SETUP.md b/SETUP.md index 98048b1..1556d5d 100644 --- a/SETUP.md +++ b/SETUP.md @@ -11,7 +11,7 @@ 3. Create conda environment (change 'hack_env' to any name you want) ``` conda update conda - conda env create -f conda_env.yml -n hack_env + conda env create -f conda_env.yaml -n hack_env conda activate hack_env ``` 4. Make sure proper python PATH is loaded
@@ -41,6 +41,7 @@ #### Important notes! +- If you're using CUDA compatible GPU make sure your drivers are updated! - If you are not using GPU (CUDA incompatible GPU) you may need to specify the number of GPUs manually instead of leaving the default `-1` in `project_config.yaml`: ``` num_of_gpus: 0 diff --git a/conda_env.yml b/conda_env.yaml similarity index 100% rename from conda_env.yml rename to conda_env.yaml diff --git a/project/data_modules/mnist_digits_datamodule/datasets.py b/project/data_modules/mnist_digits_datamodule/datasets.py new file mode 100644 index 0000000..e69de29 diff --git a/project/models/example_model/lightning_module.py b/project/models/example_model/lightning_module.py index 4865e1b..805c17c 100644 --- a/project/models/example_model/lightning_module.py +++ b/project/models/example_model/lightning_module.py @@ -9,12 +9,13 @@ from models.example_model.models import * class LitModel(pl.LightningModule): """ This is example of lightning model. - The folder name of LitModel used during trainig should be specified in run config and all parameters from + It should always be located in file named 'lightninig_module.py' and always be named 'LitModel'! + + The folder name of 'LitModel' used during training should be specified in run config and all parameters from 'model' section will be passed in 'hparams' dictionary. It enables you to specify what happens during training, validation and test step. - You can just remove validatin_step() or test_step() if you don't want to use them during trainig and model - should still train correctly. + You can just remove 'validation_step()' or 'test_step()' methods if you don't want to have them during training. See 'simple_mnist_classifier' for more proper example. """ diff --git a/project/project_config.yml b/project/project_config.yaml similarity index 97% rename from project/project_config.yml rename to project/project_config.yaml index 8e87346..a4c3c46 100644 --- a/project/project_config.yml +++ b/project/project_config.yaml @@ -1,4 +1,4 @@ -num_of_gpus: -1 +num_of_gpus: 0 resume_training: lightning_ckpt: diff --git a/project/run_configs.yml b/project/run_configs.yaml similarity index 100% rename from project/run_configs.yml rename to project/run_configs.yaml diff --git a/project/train.py b/project/train.py index b4b79f3..b9c773a 100644 --- a/project/train.py +++ b/project/train.py @@ -83,8 +83,8 @@ def load_config(path): def main(run_config_name): # Load configs - project_config = load_config("project_config.yml") - run_config = load_config("run_configs.yml")[run_config_name] + project_config = load_config("project_config.yaml") + run_config = load_config("run_configs.yaml")[run_config_name] # Train model train(project_config=project_config, run_config=run_config) diff --git a/project/utils/callbacks.py b/project/utils/callbacks.py index 91b55ad..7fcf92c 100644 --- a/project/utils/callbacks.py +++ b/project/utils/callbacks.py @@ -137,8 +137,8 @@ class SaveCodeToWandbCallback(pl.Callback): "utils/callbacks.py", "utils/init_utils.py", "train.py", - "project_config.yml", - "run_configs.yml", + "project_config.yaml", + "run_configs.yaml", ] self.model_path = os.path.dirname(inspect.getfile(lit_model.__class__)) self.datamodule_path = os.path.dirname(inspect.getfile(datamodule.__class__)) diff --git a/project/utils/execute_sweep.py b/project/utils/execute_sweep.py index 65549ad..3853246 100644 --- a/project/utils/execute_sweep.py +++ b/project/utils/execute_sweep.py @@ -8,8 +8,8 @@ import train RUN_CONFIG_NAME = "MNIST_CLASSIFIER_V1" # Load configs -project_config = train.load_config("../project_config.yml") -run_config = train.load_config("../run_configs.yml")[RUN_CONFIG_NAME] +project_config = train.load_config("../project_config.yaml") +run_config = train.load_config("../run_configs.yaml")[RUN_CONFIG_NAME] # Initialize wandb wandb.init() diff --git a/project/utils/predict_example.py b/project/utils/predict_example.py index 14465f3..99a31c0 100644 --- a/project/utils/predict_example.py +++ b/project/utils/predict_example.py @@ -1,7 +1,9 @@ -from models.simple_mnist_classifier.lightning_module import LitModel from data_modules.mnist_digits_datamodule import transforms from PIL import Image +# the LitModel you import should be the same as the one you used for training! +from models.simple_mnist_classifier.lightning_module import LitModel + def predict(): """ From 5758e29654cf8a8e276f8ae29e8c86befc95139f Mon Sep 17 00:00:00 2001 From: hobogalaxy Date: Sun, 29 Nov 2020 16:12:14 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4f79ecd..93116cb 100644 --- a/README.md +++ b/README.md @@ -108,34 +108,34 @@ You can store many run configurations in this file.
Example run configuration: ```yaml MNIST_CLASSIFIER_V1: - trainer: <- lightning 'Trainer' parameters (all except 'max_epochs' are optional) - max_epochs: 5 <- number of training epochs - gradient_clip_val: 0.5 <- gradient clipping value (helps with exploding gradient issues) - accumulate_grad_batches: 3 <- optimise after accumulating gradient from 3 batches - limit_train_batches: 1.0 <- 0.6 would mean to train only on 60% of training data - model: <- all of the parameters here will be passed to 'LitModel' in 'hparams' dictionary - model_folder: "simple_mnist_classifier" <- name of folder from which 'lightning_module.py' (with 'LitMdodel' class) will be loaded - lr: 0.001 <- learning rate - weight_decay: 0.000001 <- L2 normalization set in optimizer - input_size: 784 # img size for mnist digits is 1*28*28 - output_size: 10 # there are 10 digit classes - lin1_size: 256 - lin2_size: 256 - lin3_size: 128 - dataset: <- all of the parameters here will be passed to 'DataModule' in 'hparams' dictionary - datamodule_folder: "mnist_digits_datamodule" <- name of folder from which 'datamodule.py' (with 'DataModule' class) will be loaded - batch_size: 256 <- batch size - train_val_split_ratio: 0.9 <- split ratio between training and validation set - num_workers: 1 <- how many subprocesses to use for data loading - pin_memory: False <- if True, the data loader will copy Tensors into CUDA pinned memory before returning them. + trainer: <- lightning 'Trainer' parameters (all except 'max_epochs' are optional) + max_epochs: 5 + gradient_clip_val: 0.5 + accumulate_grad_batches: 3 + limit_train_batches: 1.0 + model: <- all of the parameters here will be passed to 'LitModel' in 'hparams' dictionary + model_folder: "simple_mnist_classifier" <- name of folder from which 'lightning_module.py' (with 'LitMdodel' class) will be loaded + lr: 0.001 + weight_decay: 0.000001 + input_size: 784 + output_size: 10 + lin1_size: 256 + lin2_size: 256 + lin3_size: 128 + dataset: <- all of the parameters here will be passed to 'DataModule' in 'hparams' dictionary + datamodule_folder: "mnist_digits_datamodule" <- name of folder from which 'datamodule.py' (with 'DataModule' class) will be loaded + batch_size: 256 + train_val_split_ratio: 0.9 + num_workers: 1 + pin_memory: False ``` ## Workflow -1. Add your model to 'project/models' folder
- (you need to create folder with 'lightning_module.py' file containing 'LitModel' class) -2. Add your datamodule to 'project/data_modules' folder
- (you need to create folder with 'datamodule.py' file containig 'DataModule' class) +1. Add your model to `project/models` folder
+ (you need to create folder with `lightning_module.py` file containing `LitModel` class) +2. Add your datamodule to `project/data_modules` folder
+ (you need to create folder with `datamodule.py` file containig `DataModule` class) 3. Add your run config to [run_configs.yaml](project/run_configs.yaml) (specify there folders containing your model and datamodule) 3. Configure [project_config.yaml](project/project_config.yaml) 4. Run training: