-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started to add Hydra, need to finish
- Loading branch information
1 parent
d2b183b
commit 945f05c
Showing
6 changed files
with
94 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
checkpoint: | ||
_target_: lightning.pytorch.callbacks.ModelCheckpoint | ||
save_last: True # additionally, always save model from last epoch | ||
verbose: False | ||
dirpath: "checkpoints/${now:%Y%m%d}/" | ||
filename: "epoch_{epoch:01d}" #"hnet_model_DOA{max_len}_{'-'.join(map(str, sample_range_used))}_epoch_{epoch:01d}" | ||
monitor: "validation_loss" | ||
save_top_k: 1 | ||
mode: "min" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
model_summary: | ||
_target_: lightning.pytorch.callbacks.RichModelSummary | ||
max_depth: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
log_every_n_steps: 100 | ||
|
||
logger: | ||
_target_: lightning.pytorch.loggers.tensorboard.TensorBoardLogger | ||
save_dir: "tb_logs/" | ||
name: null | ||
version: . | ||
log_graph: False | ||
default_hp_metric: False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### Top-level config file for run.py | ||
|
||
# Top-level variables available in all config files | ||
description: "${hydra:runtime.choices.lightning_datamodule}: ${lightning_datamodule.id}" | ||
|
||
# Hydra configuration | ||
version_base: "1.3" | ||
hydra: | ||
job: | ||
chdir: True # change working directory to the job directory | ||
run: | ||
dir: "outputs/run/${hydra:runtime.choices.lightning_datamodule}/${lightning_datamodule.id}/${now:%Y-%m-%d_%H-%M-%S}" | ||
|
||
# Composing configs | ||
defaults: | ||
- lightning_datamodule: null # NEEDS TO BE OVERRIDDEN, will also determinate the metrics and the run directory | ||
- lightning_module: null # NEEDS TO BE OVERRIDDEN | ||
- trainer: ddp | ||
- callbacks: # Dict of callbacks | ||
# - bwe_checkpoint | ||
- rich_model_summary | ||
- logging: tensorboard | ||
- metrics: ${lightning_datamodule} | ||
- _self_ # priority is given to run.yaml for overrides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
_target_: lightning.Trainer | ||
|
||
# Hardware | ||
accelerator: gpu | ||
num_nodes: 1 | ||
devices: '0,' | ||
strategy: 'ddp_find_unused_parameters_true' | ||
|
||
# Epochs and batch sizes | ||
max_epochs: -1 | ||
#accumulate_grad_batches: 2 | ||
#limit_train_batches: 20 | ||
#limit_val_batches: 10 | ||
#limit_test_batches: 0.05 | ||
#check_val_every_n_epoch: 15 | ||
|
||
# Logging | ||
log_every_n_steps: ${logging.log_every_n_steps} | ||
#track_grad_norm: 1 | ||
|
||
# Training | ||
#overfit_batches: 1 | ||
#precision: 64 | ||
#weights_summary: "full" | ||
#precision=16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters