Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/paddle/incubate/distributed/utils/io/dist_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def load(path, **configs):
model_state_dict = paddle.incubate.distributed.utils.io.load(path="path/to/load.pdparams")
dist_model.set_state_dict(model_state_dict)

# load optimizer satte dict
# load optimizer state dict
optimizer_state_dict = paddle.incubate.distributed.utils.io.load(path="path/to/load.pdopt")
dist_optimizer.set_state_dict(optimizer_state_dict)

Expand Down Expand Up @@ -100,15 +100,15 @@ def load_with_place(path, **configs):
origin_place = paddle.get_device()
paddle.set_device(place)

configs = _remove_not_supported_itmes(configs)
configs = _remove_not_supported_items(configs)
state_dict = paddle.load(path, **configs)

paddle.set_device(origin_place)

return state_dict


def _remove_not_supported_itmes(configs):
def _remove_not_supported_items(configs):
__supported_by_load__ = [
"model_filename",
"params_filename",
Expand Down