[train][checkpoint] Add checkpoint_upload_function to ray.train.report#56208
Merged
justinvyu merged 14 commits intoray-project:masterfrom Oct 1, 2025
Merged
Conversation
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
2b2e1e2 to
c123ffd
Compare
Signed-off-by: Timothy Seah <tseah@anyscale.com>
justinvyu
reviewed
Sep 17, 2025
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
justinvyu
reviewed
Sep 29, 2025
Contributor
justinvyu
left a comment
There was a problem hiding this comment.
API looks good to me now!
Signed-off-by: Timothy Seah <tseah@anyscale.com>
…kpoint-upload-function
Signed-off-by: Timothy Seah <tseah@anyscale.com>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com> Signed-off-by: Seiji Eicher <seiji@anyscale.com>
dstrodtman
pushed a commit
that referenced
this pull request
Oct 6, 2025
#56208) After #55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com> Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
liulehui
pushed a commit
to liulehui/ray
that referenced
this pull request
Oct 9, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com>
joshkodi
pushed a commit
to joshkodi/ray
that referenced
this pull request
Oct 13, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com> Signed-off-by: Josh Kodi <joshkodi@gmail.com>
justinyeh1995
pushed a commit
to justinyeh1995/ray
that referenced
this pull request
Oct 20, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com>
Aydin-ab
pushed a commit
to Aydin-ab/ray-aydin
that referenced
this pull request
Nov 19, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
ray-project#56208) After ray-project#55637, `ray.train.report` will allow users to upload checkpoints from disk to remote storage asynchronously. If they want to use framework-specific async checkpointing like `torch.async_save`, they can manage `torch.async_save` themselves and then call `ray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD)`. However, it would also be nice to allow `ray.train.report` to handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing a `checkpoint_upload_function` argument that can replace the `persist_current_checkpoint` call. --------- Signed-off-by: Timothy Seah <tseah@anyscale.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After #55637,
ray.train.reportwill allow users to upload checkpoints from disk to remote storage asynchronously.If they want to use framework-specific async checkpointing like
torch.async_save, they can managetorch.async_savethemselves and then callray.train.report(…checkpoint_upload_mode=CheckpointUploadMode.NO_UPLOAD).However, it would also be nice to allow
ray.train.reportto handle rate limiting and report ordering for framework-specific async checkpointing as well. This PR achieves this by exposing acheckpoint_upload_functionargument that can replace thepersist_current_checkpointcall.Tests
Tested with
torch.distributed'sasync_savein a workspace. The code looks likeand correctly returned a
Resultobject with 3 checkpoints and their associated metrics. Note that the checkpoint path must be inside the "experiment path" which is configured in theRunConfigand accessed throughbuild_checkpoint_path_from_name.Note
Adds an optional checkpoint_upload_fn to ray.train.report (and internal plumbing) to override checkpoint upload/persistence, with corresponding tests.
ray.train.report(...)addscheckpoint_upload_fnto allow custom checkpoint upload logic.checkpoint_upload_fnthroughTrainContext.reportand_upload_checkpoint; if provided, use it instead ofStorageContext.persist_current_checkpoint.TrainFnUtils(abstract, distributed, local) and public API wrappers.test_report_checkpoint_upload_fnvalidating custom upload function integrates with storage and result checkpoint loading.Written by Cursor Bugbot for commit e21ce19. This will update automatically on new commits. Configure here.