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

[auto_parallel] Layered Implementation of load_state_dict #66925

Merged

Conversation

xingmingyyj
Copy link
Contributor

@xingmingyyj xingmingyyj commented Aug 1, 2024

PR Category

Auto Parallel

PR Types

Improvements

Description

对load_state_dict进行分层,为checkpoint converter提供api

Copy link

paddle-bot bot commented Aug 1, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Aug 1, 2024
@@ -63,23 +63,23 @@ def get_checkpoint_files(path, use_cache=True):
return (metadata_files, local_data_files)


def get_rank_to_files(path, state_dict, process_group, use_dist):
def get_rank_to_files(
metadata, local_data_files, state_dict, process_group, use_dist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata 可不限制为1个,可以接收 list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@@ -192,6 +192,11 @@ def get_read_rank_file(rank_to_not_read_files, ranks):
for rank, files in rank_to_not_read_files.items()
if rank in ranks
]
if len(nums) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加一下 Note,说明一下原因

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已添加

zhangbo9674
zhangbo9674 previously approved these changes Aug 2, 2024
Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

zhangbo9674
zhangbo9674 previously approved these changes Aug 2, 2024
Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangbo9674 zhangbo9674 merged commit b940ee6 into PaddlePaddle:develop Aug 5, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants