Skip to content

Commit

Permalink
Remove yaml extension from hydra defaults lists (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
tesfaldet committed Jul 29, 2023
1 parent 9355a5d commit b987605
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions configs/callbacks/default.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defaults:
- model_checkpoint.yaml
- early_stopping.yaml
- model_summary.yaml
- rich_progress_bar.yaml
- model_checkpoint
- early_stopping
- model_summary
- rich_progress_bar
- _self_

model_checkpoint:
Expand Down
2 changes: 1 addition & 1 deletion configs/debug/fdr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# runs 1 train, 1 validation and 1 test step

defaults:
- default.yaml
- default

trainer:
fast_dev_run: true
2 changes: 1 addition & 1 deletion configs/debug/limit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# uses only 1% of the training data and 5% of validation/test data

defaults:
- default.yaml
- default

trainer:
max_epochs: 3
Expand Down
2 changes: 1 addition & 1 deletion configs/debug/overfit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# overfits to 3 batches

defaults:
- default.yaml
- default

trainer:
max_epochs: 20
Expand Down
2 changes: 1 addition & 1 deletion configs/debug/profiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# runs with execution time profiling

defaults:
- default.yaml
- default

trainer:
max_epochs: 1
Expand Down
12 changes: 6 additions & 6 deletions configs/eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

defaults:
- _self_
- data: mnist.yaml # choose datamodule with `test_dataloader()` for evaluation
- model: mnist.yaml
- data: mnist # choose datamodule with `test_dataloader()` for evaluation
- model: mnist
- logger: null
- trainer: default.yaml
- paths: default.yaml
- extras: default.yaml
- hydra: default.yaml
- trainer: default
- paths: default
- extras: default
- hydra: default

task_name: "eval"

Expand Down
8 changes: 4 additions & 4 deletions configs/experiment/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# python train.py experiment=example

defaults:
- override /data: mnist.yaml
- override /model: mnist.yaml
- override /callbacks: default.yaml
- override /trainer: default.yaml
- override /data: mnist
- override /model: mnist
- override /callbacks: default
- override /trainer: default

# all parameters below will be merged with parameters from default configurations set above
# this allows you to overwrite only specified parameters
Expand Down
12 changes: 6 additions & 6 deletions configs/logger/many_loggers.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# train with many loggers at once

defaults:
# - comet.yaml
- csv.yaml
# - mlflow.yaml
# - neptune.yaml
- tensorboard.yaml
- wandb.yaml
# - comet
- csv
# - mlflow
# - neptune
- tensorboard
- wandb
16 changes: 8 additions & 8 deletions configs/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# order of defaults determines the order in which configs override each other
defaults:
- _self_
- data: mnist.yaml
- model: mnist.yaml
- callbacks: default.yaml
- data: mnist
- model: mnist
- callbacks: default
- logger: null # set logger here or use command line (e.g. `python train.py logger=tensorboard`)
- trainer: default.yaml
- paths: default.yaml
- extras: default.yaml
- hydra: default.yaml
- trainer: default
- paths: default
- extras: default
- hydra: default

# experiment configs allow for version control of specific hyperparameters
# e.g. best hyperparameters for given model and datamodule
Expand All @@ -22,7 +22,7 @@ defaults:

# 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
- optional local: default

# debugging config (enable through command line, e.g. `python train.py debug=default)
- debug: null
Expand Down
2 changes: 1 addition & 1 deletion configs/trainer/cpu.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults:
- default.yaml
- default

accelerator: cpu
devices: 1
2 changes: 1 addition & 1 deletion configs/trainer/ddp.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults:
- default.yaml
- default

strategy: ddp

Expand Down
2 changes: 1 addition & 1 deletion configs/trainer/ddp_sim.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults:
- default.yaml
- default

# simulate DDP on CPU, useful for debugging
accelerator: cpu
Expand Down
2 changes: 1 addition & 1 deletion configs/trainer/gpu.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults:
- default.yaml
- default

accelerator: gpu
devices: 1
2 changes: 1 addition & 1 deletion configs/trainer/mps.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults:
- default.yaml
- default

accelerator: mps
devices: 1

0 comments on commit b987605

Please sign in to comment.