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

Tests Refactoring #740

Open
wants to merge 42 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
- introduce parameter to cut down on makefile commands
- draw out tests that are not executed on every model into a seperate directory
- move the adapter method test implemenations into the method tests directory
- rename files for more clarity
@TimoImhof TimoImhof force-pushed the dev/test-refactoring branch from dc8af55 to ffd21a9 Compare December 18, 2024 15:02
@calpt calpt mentioned this pull request Dec 23, 2024
TimoImhof and others added 3 commits December 23, 2024 18:42
- test was previously not included in testbase -> exclude it also now
- revert debugging changes
@TimoImhof TimoImhof marked this pull request as ready for review December 26, 2024 10:29
@TimoImhof TimoImhof changed the title WIP: Tests Refactoring Tests Refactoring Dec 26, 2024
TimoImhof and others added 6 commits December 27, 2024 12:48
julian-fong added a commit to julian-fong/adapters that referenced this pull request Jan 11, 2025
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