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
7abc1d96
Unverified
Commit
7abc1d96
authored
Nov 05, 2020
by
Sam Shleifer
Committed by
GitHub
Nov 05, 2020
Browse files
no warn (#8329)
parent
52f44dd6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/seq2seq/utils.py
examples/seq2seq/utils.py
+1
-1
No files found.
examples/seq2seq/utils.py
View file @
7abc1d96
...
@@ -269,7 +269,7 @@ class Seq2SeqDataCollator:
...
@@ -269,7 +269,7 @@ class Seq2SeqDataCollator:
),
f
"pad_token_id is not defined for (
{
self
.
tokenizer
.
__class__
.
__name__
}
), it must be defined."
),
f
"pad_token_id is not defined for (
{
self
.
tokenizer
.
__class__
.
__name__
}
), it must be defined."
self
.
data_args
=
data_args
self
.
data_args
=
data_args
self
.
tpu_num_cores
=
tpu_num_cores
self
.
tpu_num_cores
=
tpu_num_cores
self
.
dataset_kwargs
=
{
"add_prefix_space"
:
isinstance
(
tokenizer
,
BartTokenizer
)}
self
.
dataset_kwargs
=
{
"add_prefix_space"
:
True
}
if
isinstance
(
tokenizer
,
BartTokenizer
)
else
{
}
if
data_args
.
src_lang
is
not
None
:
if
data_args
.
src_lang
is
not
None
:
self
.
dataset_kwargs
[
"src_lang"
]
=
data_args
.
src_lang
self
.
dataset_kwargs
[
"src_lang"
]
=
data_args
.
src_lang
if
data_args
.
tgt_lang
is
not
None
:
if
data_args
.
tgt_lang
is
not
None
:
...
...
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