From b2c6383f447e0b244599e46384f795cfe6f2eea7 Mon Sep 17 00:00:00 2001 From: Danielle Pintz Date: Tue, 5 Sep 2023 14:56:56 +0000 Subject: [PATCH] [pytorch] Small fix to docstring of FSDP.optim_state_dict_to_load (#108383) Summary: Fix ordering of args in docstring Test Plan: N/A Differential Revision: D48889668 Pull Request resolved: https://github.com/pytorch/pytorch/pull/108383 Approved by: https://github.com/fegin, https://github.com/awgu, https://github.com/wz337 --- torch/distributed/fsdp/fully_sharded_data_parallel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/distributed/fsdp/fully_sharded_data_parallel.py b/torch/distributed/fsdp/fully_sharded_data_parallel.py index 09754531c32ab..9e37b77482f2c 100644 --- a/torch/distributed/fsdp/fully_sharded_data_parallel.py +++ b/torch/distributed/fsdp/fully_sharded_data_parallel.py @@ -1875,7 +1875,7 @@ def optim_state_dict_to_load( >>> ) >>> model.load_state_dict(state_dict) >>> optim_state_dict = FSDP.optim_state_dict_to_load( - >>> optim_state_dict, model, optim + >>> model, optim, optim_state_dict >>> ) >>> optim.load_state_dict(optim_state_dict)