Skip to content

Commit cfcda4b

Browse files
zhouzaidasvekars
andauthored
Update distributed_checkpoint_recipe.rst (#2960)
Co-authored-by: Svetlana Karslioglu <[email protected]>
1 parent ffc8efc commit cfcda4b

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)