Skip to content
Merged
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: 3 additions & 1 deletion checkpoint_engine/ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,13 +792,15 @@ def update(
self.init_process_group()
self._update_per_bucket(checkpoint_name, req_func)
else:
if self._rank not in ranks:
if not self._auto_pg and self._rank not in ranks:
return
if self._auto_pg:
if dist.is_initialized():
dist.destroy_process_group()
# HACK: wait 2s to ensure destroy is finished
time.sleep(2)
if self._rank not in ranks:
return
self.init_process_group_for_ranks(ranks)
self._update_per_bucket_p2p(checkpoint_name, req_func, ranks)
if self._auto_pg:
Expand Down