Skip to content

Conversation

sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Oct 3, 2025

What does this PR do?

Migrates the LoRA pipeline tests (tests/lora/) to pure pytest because it has multiple advantages.

Summary of changes

  1. Use proper pytest fixtures wherever possible. This applies to tmpdirname, base_pipe_output, etc. This also helps in reducing LoC.
  2. Replace self.assert* methods with simpler asserts.
  3. Integration tests had setUp and tearDown methods. Those have been replaced with proper pytest fixtures as well.

Will let the CI decide if this is good to go. Will also run the integration tests, meanwhile and fix anything that comes on the way.

Edit: Ran the integration tests and they're good to go :)

def test_simple_inference_with_text_denoiser_lora_unfused(self):
super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3)

def test_simple_inference_save_pretrained(self):
Copy link
Member Author

Choose a reason for hiding this comment

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

It's not testing any LoRA-related stuff. So, let's remove.

@sayakpaul sayakpaul requested a review from DN6 October 3, 2025 15:42
@sayakpaul sayakpaul changed the title [wip] Migrate lora pipeline tests to use pytest Migrate lora pipeline tests to use pytest Oct 3, 2025
@sayakpaul sayakpaul marked this pull request as ready for review October 3, 2025 15:42
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.

1 participant