Repository: huggingface/transformers
File: tests/models/glm_image/test_modeling_glm_image.py (Python)

Code before:
    def test_multi_gpu_data_parallel_forward(self):
        pass

    @unittest.skip(
        "GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_disk_offload_safetensors(self):
        pass

    @unittest.skip(
        "GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_disk_offload_bin(self):
        pass

    @unittest.skip(
        "GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_cpu_offload(self):
        pass

    @unittest.skip(
        "GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_model_parallelism(self):
        pass

    @unittest.skip("Error with compilation")
    def test_generate_from_inputs_embeds_with_static_cache(self):
        pass

    @parameterized.expand([("greedy", 1), ("beam search", 2)])
    @unittest.skip(reason="GLM-Image does not use inputs_embeds")
    def test_generate_from_inputs_embeds(self, _, num_beams):
        pass

    @unittest.skip(reason="GLM-Image input embed is compare with inputs_ids and image_ids")
    def test_inputs_embeds_matches_input_ids(self):
        pass

    @unittest.skip(reason="GLM-Image does not use inputs_embeds")
    def test_inputs_embeds(self):
        pass

    @unittest.skip(reason="GLM-Image can't do text-only inference")
    def test_generate_from_random_inputs_embeds(self):
        pass

    @unittest.skip(reason="GLM-Image can't do and does not need assisted generation. Not worth fixing!")
    def test_assisted_decoding_sample(self):
        pass

Review comment (bug):
I'd like to avoid skipping (maybe xfail in this case) too much and it seems to be something we should support at some point cc @zucchini-nlp 

Code after:
    @unittest.skip(reason="Size mismatch")
    def test_multi_gpu_data_parallel_forward(self):
        pass

    @pytest.mark.xfail(
        reason="GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_disk_offload_safetensors(self):
        pass

    @pytest.mark.xfail(
        reason="GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_disk_offload_bin(self):
        pass

    @pytest.mark.xfail(
        reason="GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_cpu_offload(self):
        pass

    @pytest.mark.xfail(
        reason="GlmImage has a VQ module that uses `weight.data` directly in forward which prevent offloading on that module"
    )
    def test_model_parallelism(self):
        pass

    @unittest.skip("Error with compilation")
    def test_generate_from_inputs_embeds_with_static_cache(self):
        pass

    @parameterized.expand([("greedy", 1), ("beam search", 2)])
    @unittest.skip(reason="GLM-Image does not use inputs_embeds")
    def test_generate_from_inputs_embeds(self, _, num_beams):
        pass

    @unittest.skip(reason="GLM-Image input embed is compare with inputs_ids and image_ids")
    def test_inputs_embeds_matches_input_ids(self):
        pass

    @unittest.skip(reason="GLM-Image does not use inputs_embeds")
    def test_inputs_embeds(self):
        pass

    @unittest.skip(reason="GLM-Image can't do text-only inference")
    def test_generate_from_random_inputs_embeds(self):
        pass

    @unittest.skip(reason="GLM-Image can't do and does not need assisted generation. Not worth fixing!")
    def test_assisted_decoding_sample(self):