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

WIP: Tests Refactoring #740

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

TimoImhof
Copy link
Contributor

@TimoImhof TimoImhof commented Sep 16, 2024

This PR aims to refactor the test suite into a more generic version.

The following points are to be covered (subject to change; will become more granular):

  • Add more granularity to test viewer for better test overview/readability and more convenient testing of subgroups of methods (e.g. only exectue LoRA tests for one model)
  • Add documentation about the structure of the test directory and entry points
  • Add pytest markers to allow for more granular testing of subgroups (e.g. exectue only LoRA tests for all models at once, useful when implementing a new adapter method)
  • Refactor test methods to extract similar/duplicate code into a set of utils methods
  • Relocate edgecases due to model peculiarities out of the tests and into the respective model test classes to keeps the tests generic

This should make it easier to add new models or methods to the existing test suite in the future and make the development/testing process more convenient in the future

TimoImhof and others added 10 commits September 16, 2024 10:10
- reorder directory structure to separate testing models and adapter methods (needs further refactoring for separating tests that are extecuted for each model vs tests that are just run once)
- remove all model tests except albert for now (will be readded once final design is agreed on)
- refactor albert adapter test class to group test mixins in categories which are then displayed accordingly by test viewer
- adjust imports to reflect new directory structure
@TimoImhof TimoImhof changed the title WIP: Generic Tests WIP: Tests Refactoring Nov 4, 2024
- refactor generate_test into base test class and adapt parallel generate test accordingly
- refactor lm head selection into own method
- create utils file for utility methods and adapt imports accordingly
- remove is_speech_model flags
- replace redundant attributes and methods
- enforce proper method naming conventions
- Re-add bart adapter method tests
- Remove duplicate added tests
- In conversion test refactor model specific if else statements into model test class
- deberta
- debertav2
- distilbert
- electra
- encoder-decoder
- llama
- mbart
- mistral
- mt5
- plbart
- roberta
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