mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[FSDP][Easy] Fix state_dict_type() docstring example
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77848 Approved by: https://github.com/rohan-varma
This commit is contained in:
parent
96e674a0c9
commit
36bf8007f7
|
|
@ -1708,8 +1708,7 @@ class FullyShardedDataParallel(nn.Module):
|
|||
Example::
|
||||
|
||||
>>> model = DDP(FSDP(...))
|
||||
>>> fsdp_root = model.module
|
||||
>>> with FSDP.state_dict_type(fsdp_root, StateDictType.LOCAL_STATE_DICT):
|
||||
>>> with FSDP.state_dict_type(model, StateDictType.LOCAL_STATE_DICT):
|
||||
>>> checkpoint = model.state_dict()
|
||||
|
||||
Args:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user