From 23d6095e8f1ea3b47f2744e2ff84e570046dd87a Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Mon, 17 Feb 2025 11:49:07 +0100 Subject: [PATCH] Fix `LlavaForConditionalGenerationModelTest::test_config` after #36077 (#36230) fix Co-authored-by: ydshieh --- tests/models/llava/test_modeling_llava.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/models/llava/test_modeling_llava.py b/tests/models/llava/test_modeling_llava.py index b47423a02e..347b147c76 100644 --- a/tests/models/llava/test_modeling_llava.py +++ b/tests/models/llava/test_modeling_llava.py @@ -198,6 +198,13 @@ class LlavaForConditionalGenerationModelTest(ModelTesterMixin, GenerationTesterM ) def test_config(self): + # overwritten from `tests/test_configuration_common.py::ConfigTester` after #36077 + # TODO: avoid overwritten once there is a better fix for #36077 + def check_config_can_be_init_without_params(): + config = self.config_tester.config_class() + self.config_tester.parent.assertIsNotNone(config) + + self.config_tester.check_config_can_be_init_without_params = check_config_can_be_init_without_params self.config_tester.run_common_tests() # overwrite inputs_embeds tests because we need to delete "pixel values" for LVLMs