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
5777c3cb
Unverified
Commit
5777c3cb
authored
May 18, 2023
by
Yih-Dar
Committed by
GitHub
May 18, 2023
Browse files
Fix (skip) a pipeline test for `RwkvModel` (#23444)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
8cfae440
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
tests/pipelines/test_pipelines_text_generation.py
tests/pipelines/test_pipelines_text_generation.py
+5
-1
No files found.
tests/pipelines/test_pipelines_text_generation.py
View file @
5777c3cb
...
@@ -240,7 +240,11 @@ class TextGenerationPipelineTests(unittest.TestCase):
...
@@ -240,7 +240,11 @@ class TextGenerationPipelineTests(unittest.TestCase):
# We don't care about infinite range models.
# We don't care about infinite range models.
# They already work.
# They already work.
# Skip this test for XGLM, since it uses sinusoidal positional embeddings which are resized on-the-fly.
# Skip this test for XGLM, since it uses sinusoidal positional embeddings which are resized on-the-fly.
if
tokenizer
.
model_max_length
<
10000
and
"XGLM"
not
in
tokenizer
.
__class__
.
__name__
:
EXTRA_MODELS_CAN_HANDLE_LONG_INPUTS
=
[
"RwkvForCausalLM"
,
"XGLMForCausalLM"
]
if
(
tokenizer
.
model_max_length
<
10000
and
text_generator
.
model
.
__class__
.
__name__
not
in
EXTRA_MODELS_CAN_HANDLE_LONG_INPUTS
):
# Handling of large generations
# Handling of large generations
with
self
.
assertRaises
((
RuntimeError
,
IndexError
,
ValueError
,
AssertionError
)):
with
self
.
assertRaises
((
RuntimeError
,
IndexError
,
ValueError
,
AssertionError
)):
text_generator
(
"This is a test"
*
500
,
max_new_tokens
=
20
)
text_generator
(
"This is a test"
*
500
,
max_new_tokens
=
20
)
...
...
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