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
db0b2477
Unverified
Commit
db0b2477
authored
May 25, 2021
by
Lysandre Debut
Committed by
GitHub
May 25, 2021
Browse files
Add some tests to the slow suite #11860
parent
afe479ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
tests/test_modeling_bigbird_pegasus.py
tests/test_modeling_bigbird_pegasus.py
+2
-0
tests/test_modeling_common.py
tests/test_modeling_common.py
+3
-0
No files found.
tests/test_modeling_bigbird_pegasus.py
View file @
db0b2477
...
...
@@ -361,9 +361,11 @@ class BigBirdPegasusModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.
model
.
generate
(
**
input_dict
)
model
.
generate
(
**
input_dict
,
do_sample
=
True
,
early_stopping
=
False
,
num_return_sequences
=
3
)
@
slow
def
test_batched_forward_original_full
(
self
):
self
.
_check_batched_forward
(
attn_type
=
"original_full"
)
@
slow
def
test_batched_forward_block_sparse
(
self
):
self
.
_check_batched_forward
(
attn_type
=
"block_sparse"
,
tolerance
=
1e-1
)
...
...
tests/test_modeling_common.py
View file @
db0b2477
...
...
@@ -496,15 +496,18 @@ class ModelTesterMixin:
[
self
.
model_tester
.
num_attention_heads
,
encoder_seq_length
,
encoder_key_length
],
)
@
slow
def
test_torchscript
(
self
):
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
self
.
_create_and_check_torchscript
(
config
,
inputs_dict
)
@
slow
def
test_torchscript_output_attentions
(
self
):
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
.
output_attentions
=
True
self
.
_create_and_check_torchscript
(
config
,
inputs_dict
)
@
slow
def
test_torchscript_output_hidden_state
(
self
):
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
.
output_hidden_states
=
True
...
...
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