Skip to content

Commit

Permalink
Save only best checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawars committed Sep 18, 2023
1 parent a2ecad4 commit 2a15725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docmae/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def train(args, config: dict):
filename="epoch_{epoch:02d}",
monitor="val/loss",
mode="min",
save_top_k=2,
save_top_k=1,
),
]

Expand All @@ -138,6 +138,7 @@ def train(args, config: dict):
max_steps=config["training"].get("steps", -1),
num_sanity_val_steps=1,
enable_progress_bar=config["progress_bar"],
limit_train_batches=20
)

hidden_dim = config["model"]["hidden_dim"]
Expand Down

0 comments on commit 2a15725

Please sign in to comment.