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

ENH Make PEFT configs forward compatible #2038

Commits on Aug 26, 2024

  1. ENH Make PEFT configs forward compatible

    Right now, loading a PEFT config saved with a more recent PEFT version
    than is currently installed will lead to errors when new arguments are
    added to the config in the newer PEFT version. The current workaround is
    for users to manually edit the adapter_config.json to remove those
    entries.
    
    With this PR, PEFT will make an attempt at removing these unknown keys
    by inspecting the signature. The user will be warned about these removed
    keys. This should generally be a safe measure because we will generally
    not introduce new config settings that change the default behavior.
    However, if a non-default is used, this could lead to wrong results.
    This is mentioned in the warning.
    
    While working on the tests, I also converted the unittest.TestCase to a
    normal pytest test in order to be able to use pytest fixtures.
    
    I also plan on adding the PEFT version to the adapter_config.json in the
    future. This will allow us to better handle compatibility issues in the
    future. As adding that new key to all PEFT configs could cause a lot of
    disruption, I want to get this PR in first to ensure forward
    compatibility.
    
    Note that this new mechanism will not help anyone using a PEFT version
    <= 0.12.0, so this will be a slow transition.
    BenjaminBossan committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    5f44b13 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Configuration menu
    Copy the full SHA
    963bb0a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    78507ad View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    b66484a View commit details
    Browse the repository at this point in the history