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
ce31e3c8
Unverified
Commit
ce31e3c8
authored
May 03, 2023
by
Joao Gante
Committed by
GitHub
May 03, 2023
Browse files
Generate: slow assisted generation test (#23125)
parent
b61d5b47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
tests/generation/test_utils.py
tests/generation/test_utils.py
+1
-0
tests/models/roberta/test_modeling_roberta.py
tests/models/roberta/test_modeling_roberta.py
+0
-4
No files found.
tests/generation/test_utils.py
View file @
ce31e3c8
...
...
@@ -1457,6 +1457,7 @@ class GenerationTesterMixin:
for
output
in
(
output_contrastive
,
output_generate
):
self
.
_check_outputs
(
output
,
input_ids
,
model
.
config
,
use_cache
=
True
)
@
slow
# TODO(Joao): remove this. Some models (e.g. data2vec, xcom, roberta) have an error rate between 1 and 10%.
def
test_assisted_decoding_matches_greedy_search
(
self
):
# This test ensures that the assisted generation does not introduce output changes over greedy search.
# It breaks the pattern in the tests above, for multiple reasons:
...
...
tests/models/roberta/test_modeling_roberta.py
View file @
ce31e3c8
...
...
@@ -397,10 +397,6 @@ class RobertaModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMi
)
fx_compatible
=
True
@
unittest
.
skip
(
reason
=
"Fix me @gante"
)
def
test_assisted_greedy_search_matches_greedy_search
(
self
):
super
().
test_assisted_greedy_search_matches_greedy_search
()
def
setUp
(
self
):
self
.
model_tester
=
RobertaModelTester
(
self
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
RobertaConfig
,
hidden_size
=
37
)
...
...
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