-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[train] Storage: Change class trainable save_checkpoint implementations #38554
Conversation
Signed-off-by: Kai Fricke <kai@anyscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on this one - looks good!
@@ -1395,7 +1396,7 @@ def save_checkpoint(self, checkpoint_dir: str) -> Optional[Union[str, Dict]]: | |||
|
|||
Returns: | |||
A dict or string. If string, the return value is expected to be | |||
prefixed by `checkpoint_dir`. If dict, the return value will | |||
the `checkpoint_dir`. If dict, the return value will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should just make the return type Optional[Dict]
since we already have the string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will update
Signed-off-by: Kai Fricke <kai@anyscale.com>
# Conflicts: # python/ray/tune/utils/release_test_util.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stamp
looks good to me.
Thanks @krfricke !
…ns (ray-project#38554) Some of our (internal) class trainables return a subpath in `save_checkpoint`. This path has been deprecated with the new storage refactor. This PR updates the implementations to reconstruct the checkpoint path in `load_checkpoint` and return None in `save_checkpoint` so adhere to the new API. Signed-off-by: Kai Fricke <kai@anyscale.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
…ns (ray-project#38554) Some of our (internal) class trainables return a subpath in `save_checkpoint`. This path has been deprecated with the new storage refactor. This PR updates the implementations to reconstruct the checkpoint path in `load_checkpoint` and return None in `save_checkpoint` so adhere to the new API. Signed-off-by: Kai Fricke <kai@anyscale.com> Signed-off-by: Victor <vctr.y.m@example.com>
Why are these changes needed?
Some of our (internal) class trainables return a subpath in
save_checkpoint
. This path has been deprecated with the new storage refactor. This PR updates the implementations to reconstruct the checkpoint path inload_checkpoint
and return None insave_checkpoint
so adhere to the new API.Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.