[Tests] skip nan lora tests on PyTorch 2.5.1 CPU.#9975
Merged
Conversation
sayakpaul
commented
Nov 20, 2024
Comment on lines
130
to
133
| @unittest.skipIf( | ||
| torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), | ||
| "Test not supported on PyTorch 2.5 and CPU.", | ||
| ) |
Member
Author
There was a problem hiding this comment.
@a-r-r-o-w not important for this PR but any reason this had to be rewritten for Cog?
BenjaminBossan
approved these changes
Nov 20, 2024
Member
BenjaminBossan
left a comment
There was a problem hiding this comment.
Thanks, LGTM. My only concern is that if it gets fixed in a future PyTorch version, it can easily go unnoticed and tests continue to be skipped. That's why I usually prefer pytest.mark.xfail(..., strict=True) for such cases.
Collaborator
|
I agree with @BenjaminBossan marking with xfail is better. |
Member
Author
|
@BenjaminBossan @DN6 how about now? |
Member
Author
|
@DN6 okay to merge, pinging because of the CI failures across the board. |
DN6
approved these changes
Nov 22, 2024
lawrence-cj
pushed a commit
to lawrence-cj/diffusers
that referenced
this pull request
Nov 26, 2024
* skip nan lora tests on PyTorch 2.5.1 CPU. * cog * use xfail * correct xfail * add condition * tests
sayakpaul
added a commit
that referenced
this pull request
Dec 23, 2024
* skip nan lora tests on PyTorch 2.5.1 CPU. * cog * use xfail * correct xfail * add condition * tests
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
See: https://github.com/huggingface/diffusers/actions/runs/11925826067/job/33238594250?pr=9943#step:7:261. This PR skips the NaN
fuse_lora()tests when detected PyTorch version is 2.5 or above and the device is CPU.It's likely a PyTorch bug as the following passes on PyTorch 2.4.1 CPU but not on PyTorch 2.5.1 CPU. Thanks to Ben for helping to verifying.
See relevant PyTorch thread: pytorch/pytorch#141128.