fix typos in the tests directory (#36932)
* chore: fix typos in test codes * chore: fix typos in test codes * chore: fix typos in test codes * chore: fix typos in test codes * chore: fix typos in test codes * chore: fix typos in test codes * chore: fix typos in test codes * chore: fix typos in test codes * chore: format codes
This commit is contained in:
@@ -521,7 +521,7 @@ class IdeficsModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
|
||||
with torch.no_grad():
|
||||
outputs = model(**self._prepare_for_class(inputs_dict, model_class))
|
||||
attentions = outputs.attentions
|
||||
# IDEFICS does not support outputting attention score becuase it uses SDPA under the hood
|
||||
# IDEFICS does not support outputting attention score because it uses SDPA under the hood
|
||||
self.assertTrue(attentions[0] is None)
|
||||
out_len = len(outputs)
|
||||
|
||||
@@ -539,7 +539,7 @@ class IdeficsModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
|
||||
self_attentions = outputs.encoder_attentions if config.is_encoder_decoder else outputs.attentions
|
||||
|
||||
self.assertEqual(len(self_attentions), self.model_tester.num_hidden_layers)
|
||||
# IDEFICS does not support outputting attention score becuase it uses SDPA under the hood
|
||||
# IDEFICS does not support outputting attention score because it uses SDPA under the hood
|
||||
self.assertTrue(self_attentions[0] is None)
|
||||
|
||||
def test_hidden_states_output(self):
|
||||
|
||||
@@ -372,7 +372,7 @@ class TFIdeficsModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.TestC
|
||||
model = model_class(config)
|
||||
outputs = model(**self._prepare_for_class(inputs_dict, model_class))
|
||||
attentions = outputs.attentions
|
||||
# IDEFICS does not support outputting attention score becuase it uses SDPA under the hood
|
||||
# IDEFICS does not support outputting attention score because it uses SDPA under the hood
|
||||
self.assertTrue(attentions[0] is None)
|
||||
out_len = len(outputs)
|
||||
|
||||
@@ -386,7 +386,7 @@ class TFIdeficsModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.TestC
|
||||
self_attentions = outputs.encoder_attentions if config.is_encoder_decoder else outputs.attentions
|
||||
|
||||
self.assertEqual(len(self_attentions), self.model_tester.num_hidden_layers)
|
||||
# IDEFICS does not support outputting attention score becuase it uses SDPA under the hood
|
||||
# IDEFICS does not support outputting attention score because it uses SDPA under the hood
|
||||
self.assertTrue(self_attentions[0] is None)
|
||||
|
||||
def test_hidden_states_output(self):
|
||||
|
||||
Reference in New Issue
Block a user