Skip to content

Commit 888c393

Browse files
authored
feat: docs added for auto_pg, and auto_pg default to True (#65)
1 parent baf6f61 commit 888c393

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

checkpoint_engine/ps.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ def __init__(
868868
*,
869869
rank: int | None = None,
870870
world_size: int | None = None,
871-
auto_pg: bool = False,
871+
auto_pg: bool = True,
872872
gpu_count: int | None = None,
873873
mem_fraction: float | None = None,
874874
):
@@ -877,7 +877,7 @@ def __init__(
877877
878878
Args:
879879
auto_pg: Whether to automatically initialize the process group.
880-
Notice that if auto_pg is True, will destroy the process group after update.
880+
Notice that if auto_pg is True, will destroy the process group after update. It is recommended to set auto_pg to True!
881881
mem_fraction: The proportion (as a fraction) of the current free device memory for allocation.
882882
"""
883883
self._rank = rank or int(os.environ.get("RANK", None))
@@ -1183,6 +1183,8 @@ def update(
11831183
) -> None:
11841184
"""
11851185
Update the checkpoint to inference engine. This function should be called after gather_metas.
1186+
Warning: if _auto_pg is False when initializing ParameterServer, please make sure ALL ranks in the WORLD_SIZE call `update` function,
1187+
otherwise, it will hang.
11861188
11871189
Args:
11881190
checkpoint_name: The name of the checkpoint.

0 commit comments

Comments
 (0)