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
edf9ac11
Unverified
Commit
edf9ac11
authored
May 15, 2020
by
Lysandre Debut
Committed by
GitHub
May 15, 2020
Browse files
Should return overflowing information for the log (#4385)
parent
b908f2e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
examples/multiple-choice/utils_multiple_choice.py
examples/multiple-choice/utils_multiple_choice.py
+6
-1
No files found.
examples/multiple-choice/utils_multiple_choice.py
View file @
edf9ac11
...
@@ -535,7 +535,12 @@ def convert_examples_to_features(
...
@@ -535,7 +535,12 @@ def convert_examples_to_features(
text_b
=
example
.
question
+
" "
+
ending
text_b
=
example
.
question
+
" "
+
ending
inputs
=
tokenizer
.
encode_plus
(
inputs
=
tokenizer
.
encode_plus
(
text_a
,
text_b
,
add_special_tokens
=
True
,
max_length
=
max_length
,
pad_to_max_length
=
True
,
text_a
,
text_b
,
add_special_tokens
=
True
,
max_length
=
max_length
,
pad_to_max_length
=
True
,
return_overflowing_tokens
=
True
,
)
)
if
"num_truncated_tokens"
in
inputs
and
inputs
[
"num_truncated_tokens"
]
>
0
:
if
"num_truncated_tokens"
in
inputs
and
inputs
[
"num_truncated_tokens"
]
>
0
:
logger
.
info
(
logger
.
info
(
...
...
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