Skip to content

Commit fb57a5e

Browse files
authored
[Unified Checkpoint] fix load missing keys (#9523)
* fix load missing keys * Update check_completion.py
1 parent 8d9c341 commit fb57a5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddlenlp/trainer/unified_checkpoint/check_completion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def check_dynamic_load(args, weight_map, existed_files, is_master_weights=False,
186186
state_dict = get_expected_state_dict(model)
187187

188188
for key in state_dict.keys():
189+
if model._keys_to_ignore_on_load_missing is not None and key in model._keys_to_ignore_on_load_missing:
190+
continue
189191
if sharding_group.nranks > 1:
190192
static_name = struct2static_name_mappings.get(key, None)
191193
param_rank = param2rank.get(static_name, None)

0 commit comments

Comments
 (0)