Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoParallel] Fix ckpt convert bug for sharding v2 #9179

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddlenlp/trainer/utils/ckpt_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@
assert self.model_meta is not None
global_model_state_shapes = []
sharding_metas_keys = []
for i in range(self.pp_degree):
for j in range(self.tp_degree):
for i in range(self.tp_degree):
for j in range(self.pp_degree):

Check warning on line 218 in paddlenlp/trainer/utils/ckpt_converter.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/trainer/utils/ckpt_converter.py#L217-L218

Added lines #L217 - L218 were not covered by tests
sharding_metas_keys.append("tp{:02d}_pp{:02d}".format(i, j))
for key in sharding_metas_keys:
param_meta = self.model_meta["sharding_metas"][key]["param_meta"]
Expand Down
Loading