-
Notifications
You must be signed in to change notification settings - Fork 31.2k
FIX Broken PEFT adapter loading #42187
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
base: main
Are you sure you want to change the base?
FIX Broken PEFT adapter loading #42187
Conversation
For some time now, loading PEFT adapters directly with transformers is broken when using revisions or subfolders. To check, run: RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py -k test_peft_from_pretrained_hub_kwargs This PR makes the PEFT tests pass. The PR causing this is huggingface#41445 (bad commit: 1ee3b28, previous good comit: cad7449). However, that PR also caused other errors (see huggingface#41604), which is why this error was not immediately obvious.
| if token is not None: | ||
| adapter_kwargs["token"] = token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This change is not directly related to the PR, but I think this is the correct way to handle the token.
|
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. |
|
AFAICT, the failing tests are unrelated. |
githubnemo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my side. Thanks for handling this :)
|
ping @ArthurZucker |
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure to rebase and we want a test imo! ty for the fix
|
@ArthurZucker The branch is now up-to-date. AFAICT, failing tests are unrelated. IMO there is need for a new test because the old one already covers the mentioned cases, it's just that on main, this test fails but apparently nobody noticed. |
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 😉
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto |
|
@ArthurZucker Hmm, it seems I can't merge because the PR is not up-to-date with main? I merged main twice now, but until CI is finished, it's already out of date. Auto-merge doesn't work, probably because of the red CI. Haaalp! |
What does this PR do?
For some time now, loading PEFT adapters directly with transformers is broken when using revisions or subfolders.
To check, run:
RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py -k test_peft_from_pretrained_hub_kwargsThis PR makes the PEFT tests pass.
The PR causing this is #41445 (bad commit:
1ee3b288a62c9de658e8be117d869c2a9b835a7c, previous good comit:cad74496ca19c463a5fcc0b35ef4a1c9da2b8c4e). However, that PR also caused other errors (see #41604), which is why this error was not immediately obvious.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.