add callback for saving best metrics scores to wandb

This commit is contained in:
hobogalaxy committed 2021-01-09 23:09:18 +01:00
1 parent d24568e686
commit 0030c94b17
9 files changed
+103 -36

No files matched your search

@@ -7,11 +7,13 @@ model_checkpoint:
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"
filepath: "checkpoints/{epoch}"
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
patience: 100 # how many epochs of not improving until training stops
mode: "max" # can be "max" or "min"
min_delta: 0.0 # minimum change in the monitored metric needed to qualify as an improvement
@@ -0,0 +1,2 @@
# @package _group_
+11
View File
@@ -22,3 +22,14 @@ hydra:
sweep:
dir: logs/multiruns/${now:%Y-%m-%d_%H-%M-%S}
subdir: ${hydra.job.num}
# extra things that are logged by all loggers as hyperparameters, before training starts
extra_logs:
log_train_val_test_sizes: True,
log_trainer_args: False,
log_model_args: True,
log_datamodule_args: True,
log_optimizer_args: True,
log_model_class_name: True,
log_datamodule_class_name: True,
log_optimizer_class_name: True
@@ -49,9 +49,9 @@ optimizer:
loggers:
wandb:
args: # you can add here additional logger arguments specific for this experiment
tags: ["uwu", "best_model"]
tags: [best_model"]
notes: ""
group: ""
comet:
args:
tags: ["uwu", "best_model"]
tags: [best_model", "uwu"]
+4 -2
View File
@@ -2,5 +2,7 @@
# Csv logger config
csv_logger:
class: pytorch_lightning.logger.CSVLogger
args: {}
class: pytorch_lightning.loggers.CSVLogger
args:
save_dir: "."
name: "csv_logger/"
+3 -19
View File
@@ -4,24 +4,8 @@
wandb:
class: pytorch_lightning.logger.WandbLogger
args:
project: "project_template_test"
# entity: "your_team_name" # set to name of your team on wandb
project: "env_tests"
entity: "lodz" # set to name of your wandb team or just remove
offline: False # set True to store all logs only locally
job_type: "train"
save_dir: "./"
# some extra things which will be logged by the environment
extra_logs:
watch_model: True # make wandb watch model
log_gradients: False # log gradient histograms (avoid this for very big models)
log_train_val_test_sizes: True # log sizes of train dataset, val dataset and test dataset
log_model_args: True
log_datamodule_args: True
log_optimizer_args: True
log_trainer_args: False
log_model_class_name: True
log_datamodule_class_name: True
log_optimizer_class_name: True
save_dir: "."