Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
08939cfd
Unverified
Commit
08939cfd
authored
Sep 30, 2020
by
Suraj Patil
Committed by
GitHub
Sep 30, 2020
Browse files
[s2strainer] fix eval dataset loading (#7477)
parent
a97a73e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/seq2seq/finetune_trainer.py
examples/seq2seq/finetune_trainer.py
+2
-1
No files found.
examples/seq2seq/finetune_trainer.py
View file @
08939cfd
...
@@ -22,6 +22,7 @@ from transformers import (
...
@@ -22,6 +22,7 @@ from transformers import (
set_seed
,
set_seed
,
)
)
from
transformers.modeling_bart
import
shift_tokens_right
from
transformers.modeling_bart
import
shift_tokens_right
from
transformers.trainer_utils
import
EvaluationStrategy
from
utils
import
(
from
utils
import
(
LegacySeq2SeqDataset
,
LegacySeq2SeqDataset
,
Seq2SeqDataset
,
Seq2SeqDataset
,
...
@@ -350,7 +351,7 @@ def main():
...
@@ -350,7 +351,7 @@ def main():
max_source_length
=
data_args
.
max_source_length
,
max_source_length
=
data_args
.
max_source_length
,
prefix
=
model
.
config
.
prefix
or
""
,
prefix
=
model
.
config
.
prefix
or
""
,
)
)
if
training_args
.
do_eval
if
training_args
.
do_eval
or
training_args
.
evaluation_strategy
!=
EvaluationStrategy
.
NO
else
None
else
None
)
)
test_dataset
=
(
test_dataset
=
(
...
...
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