From 801dc8ec968516d18f1b32d5b298b683f55d680d Mon Sep 17 00:00:00 2001 From: hobogalaxy Date: Fri, 27 Nov 2020 01:34:56 +0100 Subject: [PATCH] Update README.md --- README.md | 97 +++++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 7423dd1..84be18f 100644 --- a/README.md +++ b/README.md @@ -12,43 +12,38 @@ Read [SETUP.md](SETUP.md) The directory structure of new project looks like this: ``` ├── project -│ ├── data <- Data from third party sources +│ ├── data <- Data from third party sources │ │ -│ ├── logs <- Logs generated by Weights&Biases and PyTorch Lightning +│ ├── data_modules <- Data related modules +│ │ ├── datamodules.py <- "LightningDataModule" modules +│ │ ├── datasets.py <- "Dataset" modules +│ │ └── transforms.py <- Data transformations (data preprocessing) │ │ -│ ├── docs <- Useful pdf files +│ ├── logs <- Logs generated by Weights&Biases and PyTorch Lightning │ │ -│ ├── hack_utils <- Any extra scripts not belonging to training pipeline +│ ├── utils <- Any extra scripts not belonging to training pipeline │ │ -│ ├── notebooks <- Jupyter notebooks +│ ├── notebooks <- Jupyter notebooks │ │ -│ ├── lightning_modules <- PyTorch Lightning related modules -│ │ ├── data_modules <- Data related modules -│ │ │ ├── datamodules.py <- "LightningDataModule" modules -│ │ │ ├── datasets.py <- "Dataset" modules -│ │ │ └── transforms.py <- Data transformations (data preprocessing) -│ │ │ +│ ├── lightning_modules <- PyTorch Lightning related modules │ │ ├── callbacks.py <- Training callbacks │ │ └── init_utils.py <- Some useful initializers │ │ │ ├── models │ │ ├── simple_mnist_classifier <- Example model -│ │ │ ├── lightning_module.py <- Contains train/val/test step methods -│ │ │ ├── models.py <- Neural networks declarations -│ │ │ ├── predict.py <- Predicting from trained model -│ │ │ └── __init__.py +│ │ │ ├── lightning_module.py <- Contains train/val/test step methods +│ │ │ └── models.py <- Models declarations used in lightning_module.py │ │ │ │ │ ├── simple_cifar10_classifier <- Example model -│ │ │ ├── lightning_module.py -│ │ │ ├── models.py -│ │ │ ├── predict.py -│ │ │ └── __init__.py +│ │ │ ├── lightning_module.py <- Contains train/val/test step methods +│ │ │ └── models.py <- Models declarations used in lightning_module.py │ │ │ │ │ └── ... │ │ -│ ├── config.yaml <- Training configuration -│ ├── execute_sweep.py <- Special file for executing wandb sweeps (hyperparameter search) -│ └── train.py <- Train model +│ ├── project_config.yaml <- Project configuration +│ ├── run_configs.yaml <- Different runs configurations +│ ├── execute_sweep.py <- Special file for executing wandb sweeps (hyperparameter search) +│ └── train.py <- Train model │ ├── .gitignore ├── LICENSE @@ -58,39 +53,11 @@ The directory structure of new project looks like this: └── requirements.txt ``` -## Config parameters -#### [config.yaml](project/config.yaml): +## Project config parameters +#### [project_config.yaml](project/project_config.yaml): ```yaml num_of_gpus: -1 -model_configs: - simple_mnist_classifier_v1: - model_folder_name: "simple_mnist_classifier" - max_epochs: 3 - lr: 0.001 - batch_size: 64 - weight_decay: 0.000001 - gradient_clip_val: 0.5 - accumulate_grad_batches: 1 - input_size: 784 - output_size: 10 - lin1_size: 256 - lin2_size: 256 - lin3_size: 128 - dataset: - class_name: "MNISTDataModule" - train_transforms: "minst_train_preprocess" - test_transforms: "minst_test_preprocess" - train_val_split_ratio: 0.8 - num_workers: 1 - pin_memory: False - - transfer_learning_cifar10_classifier_v1: - ... - - transfer_learning_cifar10_classifier_v2: - ... - resume_training: lightning_ckpt: resume_from_ckpt: False @@ -122,9 +89,33 @@ callbacks: printing: progress_bar_refresh_rate: 5 - weights_summary: "top" + weights_summary: "top" # "full" profiler: False ``` +## Run config parameters +#### [run_configs.yaml](project/run_configs.yaml): +```yaml +CIFAR10_CLASSIFIER_V2: + trainer: + max_epochs: 10 + gradient_clip_val: 0.5 + accumulate_grad_batches: 1 + limit_train_batches: 1.0 + model: + name: "simple_cifar10_classifier" + lr: 0.002 + weight_decay: 0.00001 + output_size: 10 + lin1_size: 512 + lin2_size: 256 + dataset: + name: "CIFAR10DataModule" + batch_size: 256 + train_val_split_ratio: 0.9 + num_workers: 1 + pin_memory: False +``` + ## Tips Read [TIPS.md](TIPS.md)