Skip to content

Commit 6c87ea1

Browse files
committed
fix the bug
1 parent 686a8f7 commit 6c87ea1

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

paddlenlp/trainer/trainer_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,6 @@ def init_optimizer(optimizer, model_sharded_state_dict, state_dict_metadata):
13881388
optimizer_state_names = [".moment1_0", ".moment2_0", ".beta1_pow_acc_0", ".beta2_pow_acc_0", ".w_0"]
13891389
inner_opt = getattr(optimizer, "_inner_opt", None)
13901390
static_to_struct_mapping = {}
1391-
model_sharded_state_dict = dict(sorted(model_sharded_state_dict.items()))
13921391
for k, v in model_sharded_state_dict.items():
13931392
if v.local_tensor.name not in static_to_struct_mapping:
13941393
static_to_struct_mapping[v.local_tensor.name] = k

0 commit comments

Comments
 (0)