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
b3b9f99e
Unverified
Commit
b3b9f99e
authored
May 18, 2022
by
Yih-Dar
Committed by
GitHub
May 18, 2022
Browse files
Fix test_t5_decoder_model_past_large_inputs (#17320)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
6da76b9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
tests/models/t5/test_modeling_tf_t5.py
tests/models/t5/test_modeling_tf_t5.py
+7
-0
No files found.
tests/models/t5/test_modeling_tf_t5.py
View file @
b3b9f99e
...
@@ -295,6 +295,13 @@ class TFT5ModelTest(TFModelTesterMixin, unittest.TestCase):
...
@@ -295,6 +295,13 @@ class TFT5ModelTest(TFModelTesterMixin, unittest.TestCase):
def
test_t5_decoder_model_past_large_inputs
(
self
):
def
test_t5_decoder_model_past_large_inputs
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
# `create_and_check_t5_decoder_model_past_large_inputs` has special inputs:
# (config, input_ids, decoder_input_ids, attention_mask)
# and we have to prepare it correctly here.
config
,
input_ids
,
input_mask
,
token_labels
=
config_and_inputs
config_and_inputs
=
(
config
,
input_ids
,
None
,
input_mask
)
self
.
model_tester
.
create_and_check_t5_decoder_model_past_large_inputs
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_t5_decoder_model_past_large_inputs
(
*
config_and_inputs
)
def
test_t5_model_xla_generate_fast
(
self
):
def
test_t5_model_xla_generate_fast
(
self
):
...
...
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