Skip to content

[Tests] Cleanup lora tests utils#11276

Merged
sayakpaul merged 4 commits into
mainfrom
cleanup-lora-tests-utils
Apr 10, 2025
Merged

[Tests] Cleanup lora tests utils#11276
sayakpaul merged 4 commits into
mainfrom
cleanup-lora-tests-utils

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

What does this PR do?

Removes repetitive code for checks and uses a function instead. As a result:

53 additions and 249 deletions.

@sayakpaul sayakpaul requested a review from hlky April 10, 2025 08:54
Copy link
Copy Markdown
Contributor

@hlky hlky left a comment

Choose a reason for hiding this comment

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

Left a couple comments, LGTM other than that, thanks @sayakpaul

Comment thread tests/lora/utils.py Outdated
Comment thread tests/lora/utils.py
Comment on lines +684 to +688
if "text_encoder" in self.pipeline_class._lora_loadable_modules:
self.assertTrue(
check_if_lora_correctly_set(pipe_from_pretrained.text_encoder),
"Lora not correctly set in text encoder",
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This one's a bit different as we're not going to be passing any config. So, we can leave it.

@sayakpaul sayakpaul requested a review from hlky April 10, 2025 10:13
@sayakpaul sayakpaul merged commit ea5a6a8 into main Apr 10, 2025
@sayakpaul sayakpaul deleted the cleanup-lora-tests-utils branch April 10, 2025 10:20
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.

2 participants