Fix error message label and docstring default in load_sharded_checkpoint#44523
Open
jnMetaCode wants to merge 1 commit intohuggingface:mainfrom
Open
Fix error message label and docstring default in load_sharded_checkpoint#44523jnMetaCode wants to merge 1 commit intohuggingface:mainfrom
jnMetaCode wants to merge 1 commit intohuggingface:mainfrom
Conversation
…d_checkpoint Fix two bugs in load_sharded_checkpoint: 1. Copy-paste error: error message for unexpected_keys incorrectly said "Missing key(s)" instead of "Unexpected key(s)" (line 1108) 2. Docstring for prefer_safe said defaults to False but actual default in function signature is True Signed-off-by: JiangNan <1394485448@qq.com>
Member
|
LGTM but cc @SunMarc |
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.
Summary
Fixes two small bugs in
load_sharded_checkpointintrainer_utils.py:Bug 1 — Copy-paste error in error message (line 1108):
When reporting unexpected keys, the error message incorrectly says "Missing key(s)" instead of "Unexpected key(s)". This is a copy-paste error from the missing keys block above.
Bug 2 — Docstring default value mismatch (line 1067):
The docstring says
prefer_safedefaults toFalse, but the function signature hasprefer_safe=True.Test plan
prefer_safe=True