Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwen-sun committed Sep 4, 2024
1 parent 8dfe87e commit a729b08
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion torchacc/dist/fsdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def optim_state_dict(
Returns:
Dict[str, Any]: A :class:`dict` containing the optimizer state for
``model``. The sharding of the optimizer state is based on
self.model. The sharding of the optimizer state is based on
``state_dict_type``.
"""
# we only support FULL_STATE_DICT and flatten parameters now
Expand Down Expand Up @@ -331,6 +331,11 @@ def load_optim_state_dict(
The default value is FULL_STATE_DICT.
rank0_only: (bool = True): control whether load state_dict only from
rank0 at the begining.
Returns:
Dict[str, Any]: A :class:`dict` containing the optimizer state for
self.model. The sharding of the optimizer state is based on
``state_dict_type``.
"""
# we only support FULL_STATE_DICT and flatten parameters now
if state_dict_type != StateDictType.FULL_STATE_DICT:
Expand Down

0 comments on commit a729b08

Please sign in to comment.