Skip to content

Commit 2efd2eb

Browse files
authored
Update distributed_checkpoint_recipe.rst
1 parent 2b0e464 commit 2efd2eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

recipes_source/distributed_checkpoint_recipe.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ The reason that we need the ``state_dict`` prior to loading is:
193193
model = ToyModel().to(rank)
194194
model = FSDP(model)
195195
196+
optimizer = torch.optim.Adam(model.parameters(), lr=0.1)
196197
# generates the state dict we will load into
197198
model_state_dict, optimizer_state_dict = get_state_dict(model, optimizer)
198199
state_dict = {

0 commit comments

Comments
 (0)