start introduction of Hydra for config management

This commit is contained in:
hobogalaxy committed 2021-01-02 17:25:54 +01:00
1 parent 99ac2a9062
commit 2726557906
19 files changed
+203 -127

No files matched your search

@@ -1,10 +1,17 @@
# to execute this experiment run:
# python train.py --exp_conf configs/experiment_configs/mnist_experiments/mnist_classifier_advanced_conf.yaml
# python train.py --exp_conf configs/experiment/mnist_experiments/advanced_conf.yaml
# (optional section)
# pytorch seed for this experiment
# it also affects random_split() method used in mnist_datamodule.py
# overwrites default pytorch seed set in project_config.yaml
seed: 1234
# (required section)
trainer_args:
min_epochs: 1 # train for at least this many epochs (denies early stopping)
max_epochs: 10
max_epochs: 10 # train for maximum this many epochs
gradient_clip_val: 0.5 # gradient clipping (helps with exploding gradient issues)
accumulate_grad_batches: 2 # perform optimization step after accumulating gradient from 2 batches
fast_dev_run: False # execute 1 training, 1 validation and 1 test epoch only
@@ -38,13 +45,6 @@ datamodule:
num_workers: 1 # num of processes used for loading data in parallel
pin_memory: False # dataloaders will copy tensors into CUDA pinned memory before returning them
# (optional section)
# pytorch seed for this experiment
# it also affects random_split() method used in mnist_datamodule.py
# overwrites default pytorch seed set in project_config.yaml
pytorch_seed:
use_seed: True
pytorch_seed: 1234
# (optional section)
# Weights&Biases logger args
@@ -55,10 +55,6 @@ wandb_args:
tags: ["v2", "uwu"]
notes: "This is example run."
# (optional section)
# path to .yaml file containing configurations of all callbacks which will be used for this experiment
# this will be combained with default callbacks set in project_config.yaml (overwrites repeating callbacks)
callbacks_configs_path: "configs/callbacks_configs/mnist_callabcks.yaml"
# (optional section)
# use this if you want to resume training from checkpoint
@@ -1,26 +0,0 @@
# to execute this experiment run:
# python train.py --exp_conf configs/experiment_configs/mnist_experiments/mnist_classifier_simple_conf.yaml
trainer_args:
max_epochs: 10
model:
load_from:
model_path: "pytorch_modules/lightning_models/simple_mnist_classifier.py"
model_class: "LitModel"
hparams:
lr: 0.001
weight_decay: 0.00001
input_size: 784
output_size: 10
lin1_size: 256
lin2_size: 256
lin3_size: 128
datamodule:
load_from:
datamodule_path: "lightning_datamodules/mnist_datamodule/mnist_datamodule.py"
datamodule_class: "MNISTDataModule"
hparams:
batch_size: 64
train_val_test_split: [55_000, 5_000, 10_000]
@@ -0,0 +1,25 @@
# to execute this experiment run:
# python train.py --exp_conf configs/experiment/mnist_experiments/simple_conf.yaml
seed: 1234
trainer_args:
max_epochs: 10
model:
class: "pytorch_modules.lightning_models.simple_mnist_classifier.LitModel"
hparams:
lr: 0.001
weight_decay: 0.00001
input_size: 784
output_size: 10
lin1_size: 256
lin2_size: 256
lin3_size: 128
datamodule:
class: "lightning_datamodules.mnist_datamodule.mnist_datamodule.MNISTDataModule"
hparams:
batch_size: 64
train_val_test_split: [55_000, 5_000, 10_000]