From 09a53b50ce3e6e659b76d47ed04389e1771183f1 Mon Sep 17 00:00:00 2001 From: Balaji Veeramani Date: Tue, 7 Mar 2023 10:30:00 -0800 Subject: [PATCH] [AIR] Label `Checkpoint.from_checkpoint` as developer API (#33094) See discussion on #29058. --------- Signed-off-by: Balaji Veeramani --- python/ray/air/checkpoint.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/ray/air/checkpoint.py b/python/ray/air/checkpoint.py index da3877e78a90f..f103ec2b6ad6b 100644 --- a/python/ray/air/checkpoint.py +++ b/python/ray/air/checkpoint.py @@ -427,16 +427,15 @@ def from_directory(cls, path: Union[str, os.PathLike]) -> "Checkpoint": return checkpoint - # TODO: Deprecate `from_checkpoint`. For context, see #29058. @classmethod + @DeveloperAPI def from_checkpoint(cls, other: "Checkpoint") -> "Checkpoint": - """Create a checkpoint from a generic :py:class:`Checkpoint`. + """Create a checkpoint from a generic :class:`Checkpoint`. This method can be used to create a framework-specific checkpoint from a - generic :py:class:`Checkpoint` object. + generic :class:`Checkpoint` object. Examples: - >>> result = TorchTrainer.fit(...) # doctest: +SKIP >>> checkpoint = TorchCheckpoint.from_checkpoint(result.checkpoint) # doctest: +SKIP # noqa: E501 >>> model = checkpoint.get_model() # doctest: +SKIP