From 0ad45e108d156e24b0cbd0fe0f5a27a4e7a3c1c3 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Thu, 19 Nov 2020 12:46:04 -0800 Subject: [PATCH] [examples/seq2seq] fix PL deprecation warning (#8577) * fix deprecation warning * fix --- examples/seq2seq/callbacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/seq2seq/callbacks.py b/examples/seq2seq/callbacks.py index 64560487496dcf..388b6d53ddd347 100644 --- a/examples/seq2seq/callbacks.py +++ b/examples/seq2seq/callbacks.py @@ -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,