Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
fc3b3c0
exclude xpu
pangengzheng Jun 25, 2023
e291552
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Jul 24, 2023
7a13c0b
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Aug 25, 2023
d81f305
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Sep 5, 2023
cd6e4fb
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Sep 5, 2023
9d27f27
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Sep 6, 2023
5037694
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Sep 13, 2023
ef695ee
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Sep 13, 2023
23aa6ff
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Sep 25, 2023
f7615b7
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Oct 16, 2023
6605dff
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Oct 19, 2023
767835d
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Oct 30, 2023
f756bc6
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Nov 8, 2023
2ffd709
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Nov 21, 2023
04e9851
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
pangengzheng Dec 7, 2023
f5d4218
fix save and load doc and not expose api in checkpoint dir
pangengzheng Dec 7, 2023
69ec51f
skip example
pangengzheng Dec 8, 2023
37b6b86
fix doc
pangengzheng Dec 13, 2023
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
8 changes: 0 additions & 8 deletions python/paddle/distributed/checkpoint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from .save_state_dict import save_state_dict
from .load_state_dict import load_state_dict

__all__ = [
"save_state_dict",
"load_state_dict",
]
5 changes: 4 additions & 1 deletion python/paddle/distributed/checkpoint/load_state_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,17 @@ def load_state_dict(
) -> None:
"""
Load the state_dict inplace from a checkpoint path.

Args:
state_dict(Dict[str, paddle.Tensor]): The state_dict to load. It will be modified inplace after loading.
path(str): The directory to load checkpoint files.
process_group(paddle.distributed.collective.Group): ProcessGroup to be used for cross-rank synchronization. Use the default process group which contains all cards.
coordinator_rank(int): The rank used to coordinate the checkpoint. Rank0 is used by default.

Example:
.. code-block:: python
>>> # doctest: +SKIP('Load state dict.')

>>> # doctest: +SKIP('run in distributed mode.')
>>> import paddle
>>> import paddle.distributed as dist
>>> ckpt_path = "./checkpoint"
Expand Down
3 changes: 2 additions & 1 deletion python/paddle/distributed/checkpoint/save_state_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def save_state_dict(

Examples:
.. code-block:: python
>>> # doctest: +SKIP('Save state dict.')

>>> # doctest: +SKIP('run in distributed mode')
>>> import paddle
>>> import paddle.distributed as dist
>>> w1 = paddle.arange(32).reshape([4, 8])
Expand Down