Repository navigation
Display peft error - #2334
Closed
Iemand005 wants to merge 2 commits into
Closed
Display peft error#2334Iemand005 wants to merge 2 commits into
Iemand005 wants to merge 2 commits into
Conversation
Datta0
reviewed
Apr 15, 2025
| except Exception as error: | ||
| peft_error = str(error) | ||
| is_peft = False | ||
| print("Unsloth: Failed to get peft config: {peft_error}.") |
Contributor
There was a problem hiding this comment.
Ideally we should notify to the user only if both the peft and auto_config fail
Otherwise, it'd confuse people why unsloth would be warning for missing peft when they are trying to load base model
Contributor
|
The original issues in this PR seems to already been addressed in the latest codebase. unsloth/unsloth/models/loader.py Line 233 in 511841d and here: unsloth/unsloth/models/loader.py Line 714 in 511841d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My script was starting and stopping without displaying any errors or showing any signs something was wrong, it just refused to run.
I did some debugging and found that a 404 is thrown when trying to fetch adapter_config.json. This error is caught but after that, nothing is done with the error. Maybe in some cases it's supposed to continue working despite a peft error but in this my case it's supposed to throw the peft error or at least display it in the console:
unsloth/unsloth/models/loader.py
Line 176 in 05f4875
I added a print so that if any error occurs fetching the config it at least lets the user know so they know what's going on.