-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[core
] Correctly passing the kwargs all over the place
#575
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
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
Thank you @younesbelkada for properly handling the kwargs✨. PR #535 also was doing some part of this. Maybe, close that and add them as a co-author here?
Also added a comment
Hi @pacman100 , this PR is ready again for review, I now have added some tests |
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.
Thank you @younesbelkada for adding tests, LGTM! 🚀
…#575) * v1 of the fix * forward contrib credits from discussions * add tests --------- Co-authored-by: winglian <winglian@users.noreply.github.com>
What does this PR do?
Before this PR we were blindly passing the kwargs all over the place, for example the snippet below would fail:
Changes introduced
_get_peft_type
as the retrieval of the PEFT type is used and call over multiple places_split_kwargs
methods insidePeftModel
to filter out kwargs that are used forhf_hub_download
Reproducible snippet
This PR fixes that by correctly filtering out the kwargs at different levels
Fixes #564
Fixes #579