Refactoring configs (#248)
- make every run be an experiment by default - deprecate `mode` configs - introduce `debug` configs - introduce `log_dir` configs - remove unnecessary utilities from `utils.extras()` - add config flag for skipping training - update README.md
This commit is contained in:
1 parent
2ff8e053bf
commit
19f5454d13
27 files changed
+210
-238
No files matched your search
+19
-11
@@ -3,23 +3,27 @@
|
||||
# specify here default training configuration
|
||||
defaults:
|
||||
- _self_
|
||||
- trainer: default.yaml
|
||||
- model: mnist.yaml
|
||||
- datamodule: mnist.yaml
|
||||
- model: mnist.yaml
|
||||
- callbacks: default.yaml
|
||||
- logger: null # set logger here or use command line (e.g. `python run.py logger=wandb`)
|
||||
- logger: null # set logger here or use command line (e.g. `python run.py logger=tensorboard`)
|
||||
- trainer: default.yaml
|
||||
|
||||
# modes are special collections of config options for different purposes, e.g. debugging
|
||||
- mode: default.yaml
|
||||
# logging folder path
|
||||
- log_dir: default.yaml
|
||||
|
||||
# experiment configs allow for version control of specific configurations
|
||||
# for example, use them to store best hyperparameters for each combination of model and datamodule
|
||||
# e.g. best hyperparameters for each combination of model and datamodule
|
||||
- experiment: null
|
||||
|
||||
# debugging config (enable through command line, e.g. `python run.py debug=one_epoch)
|
||||
- debug: null
|
||||
|
||||
# config for hyperparameter optimization
|
||||
- hparams_search: null
|
||||
|
||||
# optional local config for machine/user specific settings
|
||||
# it's optional since it doesn't need to exist and is excluded from version control
|
||||
- optional local: default.yaml
|
||||
|
||||
# enable color logging
|
||||
@@ -30,10 +34,10 @@ defaults:
|
||||
# hydra hijacks working directory by changing it to the new log directory
|
||||
# so it's useful to have this path as a special variable
|
||||
# https://hydra.cc/docs/next/tutorials/basic/running_your_app/working_directory
|
||||
work_dir: ${hydra:runtime.cwd}
|
||||
original_work_dir: ${hydra:runtime.cwd}
|
||||
|
||||
# path to folder with data
|
||||
data_dir: ${work_dir}/data/
|
||||
data_dir: ${original_work_dir}/data/
|
||||
|
||||
# pretty print config at the start of the run using Rich library
|
||||
print_config: True
|
||||
@@ -41,12 +45,16 @@ print_config: True
|
||||
# disable python warnings if they annoy you
|
||||
ignore_warnings: True
|
||||
|
||||
# set False to skip model training
|
||||
train: True
|
||||
|
||||
# evaluate on test set, using best model weights achieved during training
|
||||
# lightning chooses best weights based on metric specified in checkpoint callback
|
||||
# lightning chooses best weights based on the metric specified in checkpoint callback
|
||||
test_after_training: True
|
||||
|
||||
# seed for random number generators in pytorch, numpy and python.random
|
||||
seed: null
|
||||
|
||||
# name of the run, should be used along with experiment mode
|
||||
name: null
|
||||
# default name for the experiment, determines logging folder path
|
||||
# (you can overwrite this name in experiment configs)
|
||||
name: "default"
|
||||
Reference in new issue
Block a user