[examples/seq2seq] fix PL deprecation warning (#8577)

* fix deprecation warning

* fix
This commit is contained in:
Stas Bekman 2020-11-19 12:46:04 -08:00 committed by GitHub
parent 0e19a4c2d6
commit 0ad45e108d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import logging
import os
from pathlib import Path
import numpy as np
@ -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,