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
0d33381f
Unverified
Commit
0d33381f
authored
Feb 09, 2023
by
Joao Gante
Committed by
GitHub
Feb 09, 2023
Browse files
Tag tests as slow
⌛
(#21537)
begone slow tests
parent
3a726777
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
0 deletions
+13
-0
tests/models/bridgetower/test_modeling_bridgetower.py
tests/models/bridgetower/test_modeling_bridgetower.py
+5
-0
tests/models/mobilebert/test_modeling_tf_mobilebert.py
tests/models/mobilebert/test_modeling_tf_mobilebert.py
+5
-0
tests/models/mobilevit/test_modeling_tf_mobilevit.py
tests/models/mobilevit/test_modeling_tf_mobilevit.py
+1
-0
tests/models/rag/test_modeling_tf_rag.py
tests/models/rag/test_modeling_tf_rag.py
+1
-0
tests/test_modeling_common.py
tests/test_modeling_common.py
+1
-0
No files found.
tests/models/bridgetower/test_modeling_bridgetower.py
View file @
0d33381f
...
@@ -227,6 +227,11 @@ class BridgeTowerModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -227,6 +227,11 @@ class BridgeTowerModelTest(ModelTesterMixin, unittest.TestCase):
model
=
BridgeTowerModel
.
from_pretrained
(
model_name
)
model
=
BridgeTowerModel
.
from_pretrained
(
model_name
)
self
.
assertIsNotNone
(
model
)
self
.
assertIsNotNone
(
model
)
@
slow
def
test_save_load_fast_init_from_base
(
self
):
# Override as it is a slow test on this model
super
().
test_save_load_fast_init_from_base
()
# Override as extracting meaningful tensor from output is different for BridgeTower
# Override as extracting meaningful tensor from output is different for BridgeTower
def
test_save_load
(
self
):
def
test_save_load
(
self
):
config
,
input_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
,
input_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
...
...
tests/models/mobilebert/test_modeling_tf_mobilebert.py
View file @
0d33381f
...
@@ -317,6 +317,11 @@ class TFMobileBertModelTest(TFModelTesterMixin, unittest.TestCase):
...
@@ -317,6 +317,11 @@ class TFMobileBertModelTest(TFModelTesterMixin, unittest.TestCase):
name
=
model
.
get_bias
()
name
=
model
.
get_bias
()
assert
name
is
None
assert
name
is
None
@
slow
def
test_keras_fit
(
self
):
# Override as it is a slow test on this model
super
().
test_keras_fit
()
@
tooslow
@
tooslow
def
test_saved_model_creation
(
self
):
def
test_saved_model_creation
(
self
):
pass
pass
...
...
tests/models/mobilevit/test_modeling_tf_mobilevit.py
View file @
0d33381f
...
@@ -268,6 +268,7 @@ class MobileViTModelTest(TFModelTesterMixin, unittest.TestCase):
...
@@ -268,6 +268,7 @@ class MobileViTModelTest(TFModelTesterMixin, unittest.TestCase):
not
is_tf_available
()
or
len
(
tf
.
config
.
list_physical_devices
(
"GPU"
))
==
0
,
not
is_tf_available
()
or
len
(
tf
.
config
.
list_physical_devices
(
"GPU"
))
==
0
,
reason
=
"TF does not support backprop for grouped convolutions on CPU."
,
reason
=
"TF does not support backprop for grouped convolutions on CPU."
,
)
)
@
slow
def
test_keras_fit
(
self
):
def
test_keras_fit
(
self
):
config
,
_
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
,
_
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
...
...
tests/models/rag/test_modeling_tf_rag.py
View file @
0d33381f
...
@@ -260,6 +260,7 @@ class TFRagTestMixin:
...
@@ -260,6 +260,7 @@ class TFRagTestMixin:
num_beams
=
2
,
num_beams
=
2
,
num_return_sequences
=
2
,
num_return_sequences
=
2
,
decoder_start_token_id
=
config
.
generator
.
eos_token_id
,
decoder_start_token_id
=
config
.
generator
.
eos_token_id
,
max_new_tokens
=
5
,
)
)
self
.
assertIsNotNone
(
outputs
)
self
.
assertIsNotNone
(
outputs
)
...
...
tests/test_modeling_common.py
View file @
0d33381f
...
@@ -3305,6 +3305,7 @@ class ModelUtilsTest(TestCasePlus):
...
@@ -3305,6 +3305,7 @@ class ModelUtilsTest(TestCasePlus):
_
=
ModelWithHead
.
from_pretrained
(
tmp_dir
)
_
=
ModelWithHead
.
from_pretrained
(
tmp_dir
)
@
require_torch_gpu
@
require_torch_gpu
@
slow
def
test_pretrained_low_mem_new_config
(
self
):
def
test_pretrained_low_mem_new_config
(
self
):
# Checking for 1 model(the same one which was described in the issue) .
# Checking for 1 model(the same one which was described in the issue) .
model_ids
=
[
"gpt2"
]
model_ids
=
[
"gpt2"
]
...
...
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