-
Notifications
You must be signed in to change notification settings - Fork 33.1k
fix(x_clip): fix 8 failed test cases #45394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ydshieh
merged 8 commits into
huggingface:main
from
kaixuanliu:fix-model-tests-x_clip-20260413
Apr 28, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0ee9387
fix(x_clip): auto-fix failing tests
kaixuanliu 2a47f0b
update
kaixuanliu 67d7202
Merge branch 'main' into fix-model-tests-x_clip-20260413
kaixuanliu e4367a5
update skip reason
kaixuanliu d6ed15e
update skip reason
kaixuanliu d5a88c6
update `no_split_modules`
kaixuanliu c61fd38
update code
kaixuanliu de7cc05
Merge branch 'main' into fix-model-tests-x_clip-20260413
kaixuanliu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,6 +172,30 @@ def test_eager_matches_sdpa_inference( | |
| ): | ||
| pass | ||
|
|
||
| @unittest.skip(reason="X-CLIP needs batch size to match frames, can't crop and create new dummy inputs") | ||
| def test_flash_attn_2_inference_equivalence(self): | ||
| pass | ||
|
|
||
|
Comment on lines
+175
to
+178
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i suppose already failing on |
||
| @unittest.skip(reason="X-CLIP needs batch size to match frames, can't crop and create new dummy inputs") | ||
| def test_flash_attn_2_inference_equivalence_right_padding(self): | ||
| pass | ||
|
|
||
| @unittest.skip(reason="X-CLIP needs batch size to match frames, can't crop and create new dummy inputs") | ||
| def test_flash_attn_3_inference_equivalence(self): | ||
| pass | ||
|
|
||
| @unittest.skip(reason="X-CLIP needs batch size to match frames, can't crop and create new dummy inputs") | ||
| def test_flash_attn_3_inference_equivalence_right_padding(self): | ||
| pass | ||
|
|
||
| @unittest.skip(reason="X-CLIP needs batch size to match frames, can't crop and create new dummy inputs") | ||
| def test_flash_attn_4_inference_equivalence(self): | ||
| pass | ||
|
|
||
| @unittest.skip(reason="X-CLIP needs batch size to match frames, can't crop and create new dummy inputs") | ||
| def test_flash_attn_4_inference_equivalence_right_padding(self): | ||
| pass | ||
|
|
||
| def test_model_get_set_embeddings(self): | ||
| config, _ = self.model_tester.prepare_config_and_inputs_for_common() | ||
|
|
||
|
|
@@ -561,6 +585,10 @@ def test_model_get_set_embeddings(self): | |
| def test_feed_forward_chunking(self): | ||
| pass | ||
|
|
||
| @unittest.skip(reason="Does not work on the tiny model as we keep hitting edge cases.") | ||
| def test_model_parallelism(self): | ||
| pass | ||
|
|
||
| def test_load_vision_text_config(self): | ||
| config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @yonigozlan and @zucchini-nlp if you remember the history and could judge the change here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I made those changes. Actually x-clip processes videos in old-style via an image processor, so this is a valid fix
I don't mind it, so we don't have to override the whole
__call__There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot