Skip tests properly (#31308)
* Skip tests properly * [test_all] * Add 'reason' as kwarg for skipTest * [test_all] Fix up * [test_all]
This commit is contained in:
@@ -553,32 +553,29 @@ class Wav2Vec2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
|
||||
config_and_inputs = self.model_tester.prepare_config_and_inputs()
|
||||
self.model_tester.check_labels_out_of_vocab(*config_and_inputs)
|
||||
|
||||
# Wav2Vec2 has no inputs_embeds
|
||||
@unittest.skip(reason="Model has no inputs_embeds")
|
||||
def test_inputs_embeds(self):
|
||||
pass
|
||||
|
||||
# `input_ids` is renamed to `input_values`
|
||||
@unittest.skip(reason="Model has input_values instead of input_ids")
|
||||
def test_forward_signature(self):
|
||||
pass
|
||||
|
||||
# Wav2Vec2 cannot resize token embeddings
|
||||
# since it has no tokens embeddings
|
||||
@unittest.skip(reason="Model has no tokens embeds")
|
||||
def test_resize_tokens_embeddings(self):
|
||||
pass
|
||||
|
||||
# Wav2Vec2 has no inputs_embeds
|
||||
# and thus the `get_input_embeddings` fn
|
||||
# is not implemented
|
||||
@unittest.skip(reason="Model has no inputs_embeds")
|
||||
def test_model_get_set_embeddings(self):
|
||||
pass
|
||||
|
||||
@is_pt_flax_cross_test
|
||||
# non-robust architecture does not exist in Flax
|
||||
@unittest.skip(reason="Non-rubst architecture does not exist in Flax")
|
||||
def test_equivalence_flax_to_pt(self):
|
||||
pass
|
||||
|
||||
@is_pt_flax_cross_test
|
||||
# non-robust architecture does not exist in Flax
|
||||
@unittest.skip(reason="Non-rubst architecture does not exist in Flax")
|
||||
def test_equivalence_pt_to_flax(self):
|
||||
pass
|
||||
|
||||
@@ -729,10 +726,10 @@ class Wav2Vec2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
|
||||
# Wav2Vec2 cannot be torchscripted because of group norm.
|
||||
def _create_and_check_torch_fx_tracing(self, config, inputs_dict, output_loss=False):
|
||||
# TODO: fix it
|
||||
self.skipTest("torch 2.1 breaks torch fx tests for wav2vec2/hubert.")
|
||||
self.skipTest(reason="torch 2.1 breaks torch fx tests for wav2vec2/hubert.")
|
||||
|
||||
if not is_torch_fx_available() or not self.fx_compatible:
|
||||
return
|
||||
self.skipTest(reason="torch fx not available or not compatible with this model")
|
||||
|
||||
configs_no_init = _config_zero_init(config) # To be sure we have no Nan
|
||||
configs_no_init.return_dict = False
|
||||
@@ -907,22 +904,19 @@ class Wav2Vec2RobustModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
config_and_inputs = self.model_tester.prepare_config_and_inputs()
|
||||
self.model_tester.check_labels_out_of_vocab(*config_and_inputs)
|
||||
|
||||
# Wav2Vec2 has no inputs_embeds
|
||||
@unittest.skip(reason="Model has no input_embeds")
|
||||
def test_inputs_embeds(self):
|
||||
pass
|
||||
|
||||
# `input_ids` is renamed to `input_values`
|
||||
@unittest.skip(reason="Model has input_values instead of input_ids")
|
||||
def test_forward_signature(self):
|
||||
pass
|
||||
|
||||
# Wav2Vec2 cannot resize token embeddings
|
||||
# since it has no tokens embeddings
|
||||
@unittest.skip(reason="Model has no token embeddings")
|
||||
def test_resize_tokens_embeddings(self):
|
||||
pass
|
||||
|
||||
# Wav2Vec2 has no inputs_embeds
|
||||
# and thus the `get_input_embeddings` fn
|
||||
# is not implemented
|
||||
@unittest.skip(reason="Model has no input_embeds")
|
||||
def test_model_get_set_embeddings(self):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user