Skip to content
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

TST: Make X-LoRA tests faster #2059

Merged

Conversation

BenjaminBossan
Copy link
Member

@BenjaminBossan BenjaminBossan commented Sep 10, 2024

After some recent optimizations, the X-LoRA tests are now among the slowest ones. Part of that is that the lora adapters are re-created for each test. By changing the fixture scope, they're now only created once. I think this should be safe, as these files are not modified in the tests.

I also enabled test_scalings_logging_methods with the latest transformers to ensure that this test also passes.

After some recent optimizations, the X-LoRA tests are now the slowest
ones. Part of that is that the lora adapters are re-created for each
test. By changing the fixture scope, they're now only created once. I
think this should be safe, as these files are not modified in the tests.

I also enabled test_scalings_logging_methods with the latest
transformers to ensure that this test also passes.
@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.

@BenjaminBossan
Copy link
Member Author

Locally, X-LoRA tests duration went down from 1m11s to 0m37s.

Copy link
Member

@EricLBuehler EricLBuehler 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!

@BenjaminBossan BenjaminBossan merged commit 734ea9a into huggingface:main Sep 11, 2024
14 checks passed
@BenjaminBossan BenjaminBossan deleted the tst-make-xlora-tests-faster branch September 11, 2024 10:13
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.

3 participants