Skip to content

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Sep 1, 2025

What does this PR do?

This PR fixes test_eager_matches_sdpa_inference not run for CLIP after #37498.

#37498 changed tests/models/clip/test_modeling_clip.py from

    def test_eager_matches_sdpa_inference(self, torch_dtype: str):
        super().test_eager_matches_sdpa_inference(
            torch_dtype=torch_dtype,
            logit_keys=("last_hidden_state", "pooler_output", "image_embeds"),
            use_attention_mask_options=(None,),
        )

to

    def test_eager_matches_sdpa_inference(self, *args):
        # adding only flaky decorator here and call the parent test method
        return getattr(ModelTesterMixin, self._testMethodName)(self)

This change invalided the comment in a previous PR

#36650 (comment)

After #37498, this (parametrized) test is not run at all for CLIP with

SKIPPED (CLIP-like models have a different `test_eager_matches_sdpa_infere...)

, while a commit before it, we still have 3 tests (the overwritten ones) being run.

@ydshieh ydshieh requested review from gante and molbap September 1, 2025 05:40
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@ydshieh ydshieh merged commit cfed99d into main Sep 1, 2025
25 checks passed
@ydshieh ydshieh deleted the fix_clip_tests branch September 1, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants