Skip to content

Commit

Permalink
doc comment typo fixes and improvements (pytorch#128512)
Browse files Browse the repository at this point in the history
Pull Request resolved: pytorch#128512
Approved by: https://github.com/LucasLLC
  • Loading branch information
pradeepfn authored and pytorchmergebot committed Jun 12, 2024
1 parent eb1db67 commit 25b7537
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion torch/distributed/checkpoint/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AsyncStager(Protocol):
case a copy of the entire state dict is created on CPU RAM and returned here, allowing users
to continue training without risking changes to data which is being serialized.
2. dcp.save is called on the state_dict returned from stage in parallel. This call is respondsible
2. dcp.save is called on the state_dict returned from stage in parallel. This call is responsible
for serializing the state_dict and writing it to storage.
3. If AsyncStager.should_synchronize_after_execute is True, this method will be called immediately after
Expand Down
8 changes: 4 additions & 4 deletions torch/distributed/checkpoint/state_dict_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def async_save(
planner: Optional[SavePlanner] = None,
process_group: Optional[dist.ProcessGroup] = None,
) -> Future:
"""Asynchronous version of ``save``. This code first de-stages the state_dict on CPU, and then calls
`save` in a separate thread.
"""Asynchronous version of ``save``. This code first de-stages the state_dict on to the
staging storage (defaults to CPU memory), and then calls the `save` in a separate thread.
.. warning::
This feature is experimental and subject to change.
Expand All @@ -181,8 +181,8 @@ def async_save(
It can also be a key if the storage is a key-value store.
(Default: ``None``)
storage_writer (Optional[StorageWriter]):
Instance of StorageWriter used to perform writes. If this is not
specified, DCP will automatically infer the writer based on the
Instance of StorageWriter used to perform 'stage' and 'save'. If
this is not specified, DCP will automatically infer the writer based on the
checkpoint_id. If checkpoint_id is also None, an exception will
be raised. (Default: ``None``)
planner (Optional[SavePlanner]):
Expand Down

0 comments on commit 25b7537

Please sign in to comment.