Replace input_values_processing with unpack_inputs (#21502)
* Replace input_values_prrocessing with unpack_inputs * Skip test failing with OOM * Update tests
This commit is contained in:
@@ -304,18 +304,15 @@ class TFHubertModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
config_and_inputs = self.model_tester.prepare_config_and_inputs()
|
||||
self.model_tester.check_labels_out_of_vocab(*config_and_inputs)
|
||||
|
||||
# Hubert has no inputs_embeds
|
||||
@unittest.skip(reason="Hubert has no input embeddings")
|
||||
def test_inputs_embeds(self):
|
||||
pass
|
||||
|
||||
# Hubert cannot resize token embeddings
|
||||
# since it has no tokens embeddings
|
||||
@unittest.skip(reason="Hubert has no tokens embeddings")
|
||||
def test_resize_tokens_embeddings(self):
|
||||
pass
|
||||
|
||||
# Hubert has no inputs_embeds
|
||||
# and thus the `get_input_embeddings` fn
|
||||
# is not implemented
|
||||
@unittest.skip(reason="Hubert has no input embeddings")
|
||||
def test_model_common_attributes(self):
|
||||
pass
|
||||
|
||||
@@ -324,10 +321,6 @@ class TFHubertModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
model = TFHubertModel.from_pretrained("facebook/hubert-base-ls960")
|
||||
self.assertIsNotNone(model)
|
||||
|
||||
@unittest.skip("Loss shapes for CTC don't match the base test.")
|
||||
def test_loss_computation(self):
|
||||
pass
|
||||
|
||||
|
||||
@require_tf
|
||||
class TFHubertRobustModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
@@ -426,29 +419,36 @@ class TFHubertRobustModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
config_and_inputs = self.model_tester.prepare_config_and_inputs()
|
||||
self.model_tester.check_labels_out_of_vocab(*config_and_inputs)
|
||||
|
||||
# Hubert has no inputs_embeds
|
||||
@unittest.skip(reason="Hubert has no input embeddings")
|
||||
def test_inputs_embeds(self):
|
||||
pass
|
||||
|
||||
# Hubert cannot resize token embeddings
|
||||
# since it has no tokens embeddings
|
||||
@unittest.skip(reason="Hubert has no tokens embeddings")
|
||||
def test_resize_tokens_embeddings(self):
|
||||
pass
|
||||
|
||||
# Hubert has no inputs_embeds
|
||||
# and thus the `get_input_embeddings` fn
|
||||
# is not implemented
|
||||
@unittest.skip(reason="Hubert has no input embeddings or get_input_embeddings method")
|
||||
def test_model_common_attributes(self):
|
||||
pass
|
||||
|
||||
# We override here as passing a full batch of 13 samples results in OOM errors for CTC
|
||||
def test_dataset_conversion(self):
|
||||
default_batch_size = self.model_tester.batch_size
|
||||
self.model_tester.batch_size = 2
|
||||
super().test_dataset_conversion()
|
||||
self.model_tester.batch_size = default_batch_size
|
||||
|
||||
@slow
|
||||
def test_model_from_pretrained(self):
|
||||
model = TFHubertModel.from_pretrained("facebook/hubert-large-ls960-ft")
|
||||
self.assertIsNotNone(model)
|
||||
|
||||
@unittest.skip("Loss shapes for CTC don't match the base test.")
|
||||
def test_loss_computation(self):
|
||||
pass
|
||||
# We override here as passing a full batch of 13 samples results in OOM errors for CTC
|
||||
def test_keras_fit(self):
|
||||
default_batch_size = self.model_tester.batch_size
|
||||
self.model_tester.batch_size = 2
|
||||
super().test_keras_fit()
|
||||
self.model_tester.batch_size = default_batch_size
|
||||
|
||||
|
||||
@require_tf
|
||||
|
||||
Reference in New Issue
Block a user