Skip to content

Conversation

@sayakpaul
Copy link
Member

What does this PR do?

In case, inject_adapter_in_model() fails midway for whatever reason before injecting peft_config into the base model, we should handle have a proper guard. This PR adds hat guard.

@HuggingFaceDocBuilderDev

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.

Copy link
Member

@BenjaminBossan BenjaminBossan 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 this fix. It assumes that the PEFT config is always added first. This is probably a safe assumption, I just want to be sure.

@sayakpaul
Copy link
Member Author

@DN6 okay for you to merge?

@bghira
Copy link
Contributor

bghira commented Jan 13, 2025

does this replace #10187 ?

@sayakpaul
Copy link
Member Author

It doesn't replace. It's orthogonal.

@yiyixuxu yiyixuxu merged commit 329771e into main Jan 13, 2025
15 checks passed
@yiyixuxu yiyixuxu deleted the improve-failure-handling-peft branch January 13, 2025 19:20
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.

6 participants