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

Backwards Compatibility Tests #596

Merged
merged 26 commits into from
Nov 15, 2023
Merged

Backwards Compatibility Tests #596

merged 26 commits into from
Nov 15, 2023

Conversation

TimoImhof
Copy link
Contributor

@TimoImhof TimoImhof commented Oct 29, 2023

Pull Request: Backward Compatibility Testing

Description

This Pull Request introduces backward compatibility tests to ensure that different branches produce identical model outputs under the same conditions. The primary goal of these tests is to confirm that there are no regressions or inconsistencies in the model's behavior when developing or refactoring features on a development branch based on the main branch.

Changes

  • Added a new shell script compare.sh for running backward compatibility tests.
  • The script sets a reference output directory that must be located outside the adapters repository to ensure it's available when switching branches.
  • Created two Python scripts, create_outputs.py and compare_outputs.py, to generate and compare reference model outputs.
  • The script performs the following steps:
    1. Installs the adapters version of the current branch.
    2. Creates reference model outputs using create_outputs.py.
    3. Checks out the target branch to be tested.
    4. Installs the adapters version of the target branch.
    5. Compares the model outputs produced by the target branch with the reference outputs using compare_outputs.py.

How to Use

  1. Navigate to the back_comp directory in the terminal
  2. Run the following command: sh compare.sh

@TimoImhof TimoImhof self-assigned this Oct 29, 2023
@TimoImhof TimoImhof removed their assignment Oct 29, 2023
@TimoImhof TimoImhof changed the title Dev/backcomp Backwards Compatibiltiy Tests Oct 29, 2023
back_comp/Utils.py Outdated Show resolved Hide resolved
back_comp/Utils.py Outdated Show resolved Hide resolved
@calpt calpt changed the title Backwards Compatibiltiy Tests Backwards Compatibility Tests Nov 1, 2023
Copy link
Member

@calpt calpt left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. Could you add a short readme to the folder describing how to run the checks/ configure them?

- add first draft of a README on how to use the back_comp directory
- format files and remove unused imports
- fixes a type
- rewrites passages for better readability
- adds more details to the procedure
- makes clearer that `dev` and `main` are only representative for the generic concept of comparing two branches
@TimoImhof TimoImhof marked this pull request as ready for review November 8, 2023 12:14
- move backcomp directory to Utils directory
- now the tests of the ci-pipeline also run for the backcomp dir
- run the commands for proper file formatting
@TimoImhof TimoImhof marked this pull request as draft November 10, 2023 12:44
- Add more details to the documentation of the pyhton scripts
- Add more details to the documentation of the Utils functions
- Remove redundant functions
@TimoImhof TimoImhof marked this pull request as ready for review November 14, 2023 21:27
@TimoImhof TimoImhof changed the base branch from adapters to main November 14, 2023 21:40
@TimoImhof TimoImhof merged commit 841ce18 into adapter-hub:main Nov 15, 2023
6 checks passed
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