start introduction of Hydra for config management
This commit is contained in:
1 parent
99ac2a9062
commit
2726557906
19 files changed
+203
-127
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# @package _group_
|
||||
|
||||
model_checkpoint:
|
||||
class: "pytorch_lightning.callbacks.ModelCheckpoint"
|
||||
args:
|
||||
monitor: "val_acc" # name of the logged metric which determines when model is improving
|
||||
save_top_k: 1 # save k best lightning_models (determined by above metric)
|
||||
save_last: True # additionaly always save model from last epoch
|
||||
mode: "max" # can be "max" or "min"
|
||||
|
||||
|
||||
early_stopping:
|
||||
class: "pytorch_lightning.callbacks.EarlyStopping"
|
||||
args:
|
||||
monitor: "val_acc" # name of the logged metric which determines when model is improving
|
||||
patience: 5 # how many epochs of not improving until training stops
|
||||
mode: "max" # can be "max" or "min"
|
||||
@@ -0,0 +1,12 @@
|
||||
# @package _group_
|
||||
|
||||
class: "pytorch_modules.lightning_datamodules.mnist_datamodule.MNISTDataModule"
|
||||
|
||||
hparams:
|
||||
lr: 0.001
|
||||
weight_decay: 0.00001
|
||||
input_size: 784
|
||||
output_size: 10
|
||||
lin1_size: 256
|
||||
lin2_size: 256
|
||||
lin3_size: 128
|
||||
@@ -0,0 +1,10 @@
|
||||
# @package _group_
|
||||
# Comet logger config
|
||||
|
||||
args:
|
||||
api_key: "sadfhgadfhsdfhadgkajdgsdg"
|
||||
project_name: "project_template_test"
|
||||
|
||||
extra_options:
|
||||
log_optimizer_name: True
|
||||
log_train_val_test_sizes: True
|
||||
@@ -0,0 +1,5 @@
|
||||
# Tensorboard logger config
|
||||
|
||||
args: {}
|
||||
|
||||
extra_options: {}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Weights&Biases logger config
|
||||
|
||||
args:
|
||||
project: "project_template_test"
|
||||
entity: "" # change to your username or name of your team on wandb
|
||||
log_model: True # set True to automatically upload model checkpoint to wandb cloud after training
|
||||
offline: False # set True to store all logs only locally
|
||||
|
||||
extra_options:
|
||||
log_gradients: False # set True to log gradient histograms (avoid this for very big lightning_models)
|
||||
log_optimizer_name: True
|
||||
log_train_val_test_sizes: True
|
||||
@@ -0,0 +1,12 @@
|
||||
# @package _group_
|
||||
|
||||
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
|
||||
@@ -0,0 +1,13 @@
|
||||
# @package _group_
|
||||
|
||||
# args passed to Lightning Trainer on every experiment
|
||||
# they will be combined with trainer args specified in experiment config
|
||||
# (if the argument repeats in experiment config, then it will override the one set here)
|
||||
args:
|
||||
num_of_gpus: -1 # set -1 to train on all GPUs abailable, set 0 to train on CPU only
|
||||
auto_select_gpus: True
|
||||
num_sanity_val_steps: 3
|
||||
progress_bar_refresh_rate: 10
|
||||
weights_summary: "top"
|
||||
max_epochs: 100
|
||||
profiler: "simple" # use profiler to print execution time profiling after training ends
|
||||
Reference in new issue
Block a user