Skip to content

Commit

Permalink
[examples/seq2seq] fix PL deprecation warning (#8577)
Browse files Browse the repository at this point in the history
* fix deprecation warning

* fix
  • Loading branch information
stas00 committed Nov 19, 2020
1 parent 0e19a4c commit 0ad45e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/seq2seq/callbacks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import os
from pathlib import Path

import numpy as np
Expand Down Expand Up @@ -98,7 +97,8 @@ def get_checkpoint_callback(output_dir, metric, save_top_k=1, lower_is_better=Fa
)

checkpoint_callback = ModelCheckpoint(
filepath=os.path.join(output_dir, exp),
dirpath=output_dir,
filename=exp,
monitor=f"val_{metric}",
mode="min" if "loss" in metric else "max",
save_top_k=save_top_k,
Expand Down

0 comments on commit 0ad45e1

Please sign in to comment.