-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[auto_parallel] Layered Implementation of load_state_dict #66925
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metadata 可不限制为1个,可以接收 list
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加一下 Note,说明一下原因
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR Category
Auto Parallel
PR Types
Improvements
Description
对load_state_dict进行分层,为checkpoint converter提供api