Skip to content

Commit

Permalink
Add learning rate monitor, save 10 best epoch models
Browse files Browse the repository at this point in the history
  • Loading branch information
Purg committed Nov 15, 2024
1 parent ec3b095 commit 119689e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configs/callbacks/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ defaults:
- early_stopping
- model_summary
- rich_progress_bar
- learning_rate_monitor
- plot_metrics
- _self_

Expand All @@ -11,11 +12,10 @@ defaults:
model_checkpoint:
dirpath: ${paths.output_dir}/checkpoints
filename: "epoch_{epoch:03d}"
# monitor: "val/loss"
# mode: "min"
monitor: "val/f1"
mode: "max"
save_last: True
save_top_k: 10 # save k best models (determined by above metric)
auto_insert_metric_name: False

early_stopping:
Expand Down
4 changes: 4 additions & 0 deletions configs/callbacks/learning_rate_monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
learning_rate_monitor:
_target_: pytorch_lightning.callbacks.LearningRateMonitor
logging_interval: epoch
log_momentum: false

0 comments on commit 119689e

Please sign in to comment.