Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
0ad45e10
Unverified
Commit
0ad45e10
authored
Nov 19, 2020
by
Stas Bekman
Committed by
GitHub
Nov 19, 2020
Browse files
[examples/seq2seq] fix PL deprecation warning (#8577)
* fix deprecation warning * fix
parent
0e19a4c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/seq2seq/callbacks.py
examples/seq2seq/callbacks.py
+2
-2
No files found.
examples/seq2seq/callbacks.py
View file @
0ad45e10
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment