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
06bab003
Unverified
Commit
06bab003
authored
Apr 19, 2023
by
Yih-Dar
Committed by
GitHub
Apr 19, 2023
Browse files
Remove some pipeline skip cases (#22865)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
648bd5a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
tests/models/fnet/test_modeling_fnet.py
tests/models/fnet/test_modeling_fnet.py
+1
-1
tests/models/mbart/test_modeling_mbart.py
tests/models/mbart/test_modeling_mbart.py
+1
-2
tests/models/xlnet/test_modeling_xlnet.py
tests/models/xlnet/test_modeling_xlnet.py
+4
-2
No files found.
tests/models/fnet/test_modeling_fnet.py
View file @
06bab003
...
@@ -303,7 +303,7 @@ class FNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -303,7 +303,7 @@ class FNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def
is_pipeline_test_to_skip
(
def
is_pipeline_test_to_skip
(
self
,
pipeline_test_casse_name
,
config_class
,
model_architecture
,
tokenizer_name
,
processor_name
self
,
pipeline_test_casse_name
,
config_class
,
model_architecture
,
tokenizer_name
,
processor_name
):
):
if
pipeline_test_casse_name
==
"QAPipelineTests"
:
if
pipeline_test_casse_name
==
"QAPipelineTests"
and
not
tokenizer_name
.
endswith
(
"Fast"
)
:
return
True
return
True
return
False
return
False
...
...
tests/models/mbart/test_modeling_mbart.py
View file @
06bab003
...
@@ -257,8 +257,7 @@ class MBartModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixi
...
@@ -257,8 +257,7 @@ class MBartModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixi
def
is_pipeline_test_to_skip
(
def
is_pipeline_test_to_skip
(
self
,
pipeline_test_casse_name
,
config_class
,
model_architecture
,
tokenizer_name
,
processor_name
self
,
pipeline_test_casse_name
,
config_class
,
model_architecture
,
tokenizer_name
,
processor_name
):
):
if
pipeline_test_casse_name
!=
"FeatureExtractionPipelineTests"
:
if
pipeline_test_casse_name
==
"QAPipelineTests"
and
not
tokenizer_name
.
endswith
(
"Fast"
):
# IndexError: index out of range in self
return
True
return
True
return
False
return
False
...
...
tests/models/xlnet/test_modeling_xlnet.py
View file @
06bab003
...
@@ -546,9 +546,11 @@ class XLNetModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixi
...
@@ -546,9 +546,11 @@ class XLNetModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixi
def
is_pipeline_test_to_skip
(
def
is_pipeline_test_to_skip
(
self
,
pipeline_test_casse_name
,
config_class
,
model_architecture
,
tokenizer_name
,
processor_name
self
,
pipeline_test_casse_name
,
config_class
,
model_architecture
,
tokenizer_name
,
processor_name
):
):
# IndexError: index out of range in self
if
pipeline_test_casse_name
==
"QAPipelineTests"
and
not
tokenizer_name
.
endswith
(
"Fast"
):
return
True
return
True
return
False
# XLNet has 2 QA models -> need to manually set the correct labels for one of them here
# XLNet has 2 QA models -> need to manually set the correct labels for one of them here
def
_prepare_for_class
(
self
,
inputs_dict
,
model_class
,
return_labels
=
False
):
def
_prepare_for_class
(
self
,
inputs_dict
,
model_class
,
return_labels
=
False
):
inputs_dict
=
super
().
_prepare_for_class
(
inputs_dict
,
model_class
,
return_labels
=
return_labels
)
inputs_dict
=
super
().
_prepare_for_class
(
inputs_dict
,
model_class
,
return_labels
=
return_labels
)
...
...
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